PHP код:
new
Wanted_Reason[ MAX_PLAYERS ][ 48 ]
;
// OnPlayerConnect:
Wanted_Reason[ playerid ][ 0 ] = EOS;
// When you set the wanted to 0, reset the reason like in OnPlayerConnect.
COMMAND:makewanted(playerid, params[])
{
if(!IsPlayerFED(playerid) && GetAdminLevel(playerid) < 6) return SendClientError(playerid, CANT_USE_CMD);
new iPlayer, iLevel, iReason[ 48 ];
if( sscanf ( params, "uds[48]", iPlayer, iLevel, iReason)) return SCP(playerid, "[PlayerID/PartOfName] [level] [reason]");
if(iLevel < 1 || iLevel > 6) return SendClientError(playerid, "Invalid level. Valid: 1-6");
format(iStr, sizeof(iStr), " HQ: All units APB on %s,", RPName(iPlayer));
SendClientMessageToTeam( PlayerInfo[playerid][playerteam], iStr, COLOR_PLAYER_SPECIALBLUE);
format(iStr, sizeof(iStr), " HQ: Wanted for %s, category %d wanted suspect.", iReason, iLevel);
SendClientMessageToTeam( PlayerInfo[playerid][playerteam], iStr, COLOR_PLAYER_SPECIALBLUE);
SetPlayerWantedLevel(iPlayer, iLevel);
strcpy( Wanted_Reason[ playerid ], iReason, 48 );
return 1;
}
COMMAND:wantedlist(playerid, params[])
{
if(!IsPlayerFED(playerid) && !GetAdminLevel(playerid)) return SendClientError(playerid, CANT_USE_CMD);
PlayerLoop(i)
{
SendClientMessage(playerid, COLOR_RED,"===============[WANTED LIST]===============");
format(iStr,sizeof(iStr),"%s %d stars, Wanted for: %s",RPName(i),GetPlayerWantedLevel(i), Wanted_Reason[ i ]);
if(GetPlayerWantedLevel(i)>=5) SendClientMessage(playerid,COLOR_RED,iStr);
if(GetPlayerWantedLevel(i)<5 && GetPlayerWantedLevel(i)>=2) SendClientMessage(playerid,COLOR_ORANGE,iStr);
if(GetPlayerWantedLevel(i)<2 && GetPlayerWantedLevel(i)>0) SendClientMessage(playerid,COLOR_PLAYER_DARKYELLOW,iStr);
SendClientMessage(playerid, COLOR_RED,"===========================================");
}
return 1;
}
I guess some of this codes may help you with what you want