SA-MP Forums Archive
[Include] Spawn Protection - No timers #ASP - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Spawn Protection - No timers #ASP (/showthread.php?tid=528126)



Spawn Protection - No timers #ASP - Hanger - 26.07.2014

A little snippet include to protect players from spawn-killing each other with no timers involved. Created this for Scripting Help thread and decided to publish it in a visible place for other kiddos'

Info:
Код:
/* Spawn protection time in seconds */
#define 	ANTI_SPAWN_KILL_TIME	10

/* Maximum serverside health - in case you have 99.9 anticheat */
#define		MAX_HEALTH		100.00

/* Health to set when player spawns
if falling from a high place, player will be killed regardless of this amount */
#define		SPAWN_HEALTH		999.99
Installation
Код:
Save the document from pastebin;
Place it under pawno\includes folder;
Rename it to "asp".inc;
Add to your script "#include <asp>";
Compile your script;
PASTEBIN LINK


AW: Spawn Protection - No timers #ASP - Mellnik - 26.07.2014

You could have used OnPlayerWeaponShot and return 0 to stop bullets from causing damage.


Re: Spawn Protection - No timers #ASP - Hanger - 26.07.2014

True that but this one protects the innocent. A hacker might have a patch of OnPlayerWeaponShot or there might be several explosions! However will include this, as well as keep the current code.

Edit:done


Re: Spawn Protection - No timers #ASP - iFarbod - 26.07.2014

Nice Job +REP