24.02.2013, 05:59
(
Last edited by MehranGta; 24/02/2013 at 07:05 AM.
Reason: for fixing some problem
)
Hi
This Is my first tutorial to how can u make a simple anti spawnkill for your server:
1.goto your gamemode (.pwn) and find on top of that add this:
[this define green color]
2.goto your gamemode (.pwn) and search for "forward"
under the new make this :
[this already show what do]
3. search for onplayerspawn and under that add this
[this do : 1.set health of player to 9999 that any one cant kill for 15 seconds set timer for start 15 sec and send client message for send a message for this anti spawnkill]
4.at the final of the script add this :
[it already back health of player to 100 and send player the spawnkill over]
sorry for my bad english.
This Is my first tutorial to how can u make a simple anti spawnkill for your server:
1.goto your gamemode (.pwn) and find on top of that add this:
Code:
#define COLOR_GREEN 0x00FF00FF
2.goto your gamemode (.pwn) and search for "forward"
under the new make this :
Code:
forward aspawnkill(playerid)
3. search for onplayerspawn and under that add this
Code:
SetPlayerHealth(playerid,99999); SetTimer("aspawnkill",15000,false); SendClientMessage(playerid,COLOR_GREEN,"Antisp: You are protected by server for 15 seconds.");
4.at the final of the script add this :
Code:
public aspawnkill(playerid) { SetPlayerHealth(playerid,100.0); SendClientMessage(playerid,COLOR_GREEN,"The Anti-time Spawn Kill over"); }
sorry for my bad english.