05.09.2011, 20:00
PHP код:
CMD:unfreeze(playerid, params[])
{
if(PlayerInfo[playerid][Adminlevel] > 1)
{
new id;
if(sscanf(params, "u", id))
{
new string[64];
format(string, sizeof(string), "O Administrador %s descongelou-te", pNome(playerid));
SendClientMessage(id, 0x0259EAAA, string);
format(string, sizeof(string), "Descongelaste o jogador %s", pNome(id));
SendClientMessage(playerid, 0x0259EAAA, string);
TogglePlayerControllable(id, 1);
return 1;
}
else return SendClientMessage(playerid, 0x0259EAAA, "Comando: /freeze [playerID]");
}
else return SendClientMessage(playerid, 0x0259EAAA, "Nao йs Administrador");
}
PHP код:
stock pNome(playerid)
{//Essa funзгo irб returnar o nome do jogador, sendo assim nгo precisa toda vez usar new nome[MAX_PLAYER_NAME]; GetPlayerName e bla bla bla.
new nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, nome, sizeof(nome));
return nome;
}