Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Wanted Help

$
0
0
hey iv made an wanted system that give me the wanted reason it is working fine but when I set my friend wanted I see him on the command but if I set another one I see the new wanted without my friend so how to fix it please?
PHP Code:

CMD:wanted(playeridparams[])
{
     new 
string[256], playername[MAX_PLAYER_NAME], str[256], reas[256], mr;
     for(new 
b=0b<PLAYERSb++)
     {
         if(
GetPlayerWantedLevel(b) > 0) {
             
mr++;
         }
     }
     if(
mr==0) return SendClientMessage(playeridCOLOR_GREY"There are currently no wanted players.");
    for(new 
ii<PLAYERSi++)
    {
        if(
IsPlayerConnected2(i) && GetPlayerWantedLevel(i)>0)
        {
            
GetPlayerName(iplayernamesizeof(playername));
            
GetPVarString(i"WReason"reassizeof(reas));
            
format(string128"%s\n%s (ID:%d)\t%d\t%s\n",stringplayernameiGetPlayerWantedLevel(i), reas);
            
format(strsizeof(str), "Name\tLevel\tReason\n%s"string);
            
ShowPlayerDialog2(playeridDIALOG_WANTEDDIALOG_STYLE_TABLIST_HEADERS"Wanted Players"str"Done""");
            return 
1;
        }
    }
    return 
1;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>