11.12.2010, 09:10
Sometimes when a player types /kill they stay alive on 1 hp, any way i could fix this, as far as i know this could also be caused by server lag maybe?
Thanks in advance.
Код:
command(kill, playerid, params[])
{
new pID = playerid, string[128];
if(!IsAdmin(playerid)) return SetPlayerHealth(playerid,0.0);
if(GetPlayerAdmin(playerid) < 3) return SendBlockedAdminCommand(playerid, 3);
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /kill [ Playerid / Name ]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_YELLOW, "Player not connected.");
format(string, sizeof(string), "You killed %s [ %d ]", GetName(pID), pID);
SetPlayerHealth(pID, 0.0);
SendClientMessage(playerid, COLOR_ADMIN, string);
return 1;
}


