06.05.2014, 01:12
Adapte a tu GM
pawn Код:
if(strcmp(cmd, "/darvida", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "[SERVER]: Use: /darvida [ID/Nome] [Quantia de Vida]");
return 1;
}
new playa;
new health;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
health = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(modoadmin[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "[SERVER]: Vocк nгo estб em modo de trabalho!");
return 1;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
SetPlayerHealth(playa, health);
format(string, 256, "{FFFFFF}[ADMCMD]: O Admin %s estб editando %d de vida para %s.",PlayerName(playerid),health,PlayerName(playa));
ABroadCast(COLOR_LIGHTGREEN,string,4);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[SERVER]: Vocк nгo tem autorizaзгo para acessar estб бrea!");
}
}
return 1;
}

