09.04.2013, 13:05
So when i enter /check
i want it to check all online players if they got skin 1, how can i do this? thanks!
i want it to check all online players if they got skin 1, how can i do this? thanks!
CMD:check(playerid, params)
{
if(PlayerInfo[playerid][pAdmin] >= 1) // CHANGE THIS.
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(GetPlayerSkin(i) == 1)
{
new String[128], Name[MAX_PLAYER_NAME];
GetPlayerName(i, Name, MAX_PLAYER_NAME);
format(String, sizeof(String), "%s has skin id 1", Name);
SendClientMessage(playerid, -1, String);
}
}
}
return 1;
}