22.07.2011, 16:11
PHP код:
new bool:usou[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/profadmin", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Apenas administradores!!"); // TROQUE ISPLAYERADMIN PELA VARIAVEL QUE IDENTIFICA UM ADM
if(!usou[playerid])
{
SetPVarInt(playerid, "Skin", GetPlayerSkin(playerid));
SetPlayerSkin(playerid, 217);
usou[playerid] = true;
}
else
{
SetPlayerSkin(playerid, GetPVarInt(playerid, "Skin"));
usou[playerid] = false;
}
return 1;
}
return 0;
}