12.09.2009, 09:08
Код:
dcmd_farton(playerid,params[])
{
new tmp2[300],tmp[300], Index;
tmp = strtok(params,Index), tmp2 = strtok(params,Index);
new id = strval(tmp);
if(IsPlayerAdminLevel(playerid,2))
{
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"That Player Is Not Connected");
new string2[156], pname[24], pname2[24];
GetPlayerName(playerid, pname, 24);
GetPlayerName(id, pname2, 24);
new Float:health;
GetPlayerHealth(id,health);
SetPlayerHealth(id,health - 5);
format(string2, sizeof(string2), "Admin %s farted on %s (%d Health Left)",pname,pname2,floatround(health));
SendClientMessageToAll(COLOR_RED,string2);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You must be Admin Level 2 to do this.");
}
return 1;
}

