[Include] Spawn Protection - No timers #ASP
#1

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
Reply
#2

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

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
Reply
#4

Nice Job +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)