Help for Anti-Dgun - 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: Help for Anti-Dgun (
/showthread.php?tid=656730)
Help for Anti-Dgun -
Istrator - 22.07.2018
Hello, as what the title says.
I'm making my own Anti Dgun System which blocks SendDeathMessage. The only thing I want to block is that FISTS and block the use of FISTS as weapon.
If this would be done, it will happen like this:
When a player kills a player using Fists, it will automatically kicks him.
How to do that?
Thank you for fast reply.
Re: Help for Anti-Dgun -
GameOvr - 22.07.2018
here it is
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
if(GetPlayerWeapon(killerid) == 0) return Kick(killerid); // 0 is the id of fist you can get other ids here https://sampwiki.blast.hk/wiki/Weapons
}
return 1;
}
hope i helped you