08.10.2014, 05:16
Tenta assim:
pawn Код:
CMD:matar(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new playa;
if(sscanf(params, "u", playa))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /matar [id]");
return 1;
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(Player[playerid][pAdmin] >=4)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
SetPlayerHealth(playa, 0.0);
SetPlayerVirtualWorld(playa,0);
format(string9, sizeof(string9), "AdmCmd: %s ganhou uma morte de: %s",giveplayer ,sendername);
ABroadCast(COR_CV,string9,1);
}
}
}
else
{
SendClientMessage(playerid, COR_ERRO, " Vocк nгo estб autorizado a usar este comando!");
}
}
return true;
}