SA-MP Forums Archive
player types /kill but stays alive? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: player types /kill but stays alive? (/showthread.php?tid=198116)



player types /kill but stays alive? - Haydz - 11.12.2010

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?

Код:
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;
}
Thanks in advance.


Re: player types /kill but stays alive? - iggy1 - 11.12.2010

Try this
pawn Код:
SetPlayerHealth(pID, -999999);



Re: player types /kill but stays alive? - Retardedwolf - 11.12.2010

Slap them into the sky 50.0 meters.


Re: player types /kill but stays alive? - MBX97 - 11.12.2010

XD !!!!
pawn Код:
new MBX[ MAX_WHORES ]



Re: player types /kill but stays alive? - Haydz - 11.12.2010

Quote:
Originally Posted by MBX97
Посмотреть сообщение
XD !!!!
pawn Код:
new MBX[ MAX_WHORES ]
Cheers man I think you solved my problem....

At iggy I'll try that tomorrow thanks.