SA-MP Forums Archive
Anyone help me pls :P - 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)
+--- Thread: Anyone help me pls :P (/showthread.php?tid=614642)



Anyone help me pls :P - Rix70 - 10.08.2016

help me make the /kill filterscript that kills u when u enter but the hard thing that i cant find is when like a player attacks u he cant do it then it would like said u cant use this command now
or something like that pls can u help me ?


Re: Anyone help me pls :P - Darkwood17 - 10.08.2016

You actually don't need this. When someone is shooting at you and then you set your health to 0.0 it won't be not be considered as suicide. The killerid will be the the same person who was shooting you.

You can check it by yourself with debug code:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == INVALID_PLAYER_ID) SendClientMessage(playerid, -1, "Death reason: suicide/died");
    else SendClientMessage(playerid, -1, "You're killed");
    return 1;
}



Re: Anyone help me pls :P - Rix70 - 10.08.2016

okay so how i add this to the filterscript then?