02.10.2011, 21:39
pawn Код:
CMD:vida(playerid, params[])
{
new string [128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON.");
if(sscanf(params, "ud", id, valor[0]))return SendClientMessage(playerid, COLOR_BLACK_GRAY, "[ERRO DE SINTAXE] /vida [id] [vida]");//
if(IsPlayerConnected(id))
{
for(new allplayers = 0; allplayers < GetMaxPlayers(); allplayers++)
{
format(string, sizeof(string), "O Admnistrador %s setou a vida de %s para %d.", pNome(playerid),pNome(allplayers),valor[0]);
SendClientMessageToAll(COLOR_WHITE, string);
SetPlayerHealth(id,valor[0]);
return 1;
}
}
else return SendClientMessage(playerid, COLOR_BLACK_GRAY, "Jogador nгo conectado.");
return 1;
}
CMD:setscore(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON.");
if(sscanf(params,"ud",id, valor[0]))return SendClientMessage(playerid, COLOR_BLACK_GRAY, "[ERRO DE SINTAXE] /setscore [id] [score]");
if(IsPlayerConnected(id))
{
format(string, sizeof(string), "O Admnistrador %s setou o score de %s para %d.", pNome(playerid),pNome(i),valor[0]);
SendClientMessageToAll(COLOR_WHITE, string);
SetPlayerScore(id,valor[0]);
return 1;
}
else return SendClientMessage(playerid, COLOR_BLACK_GRAY, "Jogador nгo conectado.");
}