25.06.2012, 22:02
pawn Код:
dcmd_kill(playerid,params[])
{
if(GetPlayerWantedLevel(playerid) >= 1) return SendClientMessage(playerid, -1, "You are wanted, you cannot kill yourself!");
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, -1, "You killed yourself!");
return 1;
}
Out of three of these posts, this is the most efficient way to do this. It has less lines and looks better.
EDIT: Below post, not really. Mine looks more easier to understand, in my opinion..