23.09.2010, 12:28
(
Last edited by iJumbo; 23/09/2010 at 12:54 PM.
)
Hi all! Welcome to my tutorial
How to make anti spawn kill!
my frist tutorial
this script is for make a Anti spawn kill when u spawn your life get to 99999 for 6 seconds
and you cant get killed by spawn killers (bad english -.-)
frist you have to open your gamemode or a new filterscript
Under
put..
forward NoSpawnKill(playerid); = this is for forward a function in pawno you have 2 do this or you get a warning
ok now we have to put the player life to 999999 and make a timer for player of 6 second
to public OnPlayerSpawn(playerid)
and add this ...
SetPlayerHealth(playerid,99999); = this function is for set the player healt to one float you put (99999 is a float of life) this set the health only to the player make the command of function in this case player spawn
SetTimerEx("NoSpawnKill",6000,0,"i",playerid); = this is for set a timer for playerid is for call a function after some time in this case is 6 second 6000 millisecond
you have to make like this
now we have to create the function for put player life to 100 when timer is over
down of gamemode/filterscript or where u want no up of #include <a_samp> xD
put..
public NoSpawnKill(playerid) is a function this get called when player spawn and wait 6 seconds and then set player life to normal SetPlayerHealth(playerid,100.0);
if u want to add a message put under SetPlayerHealth(playerid,100.0);
my frist guide i have to make better one xD bye
How to make anti spawn kill!
my frist tutorial
this script is for make a Anti spawn kill when u spawn your life get to 99999 for 6 seconds
and you cant get killed by spawn killers (bad english -.-)
frist you have to open your gamemode or a new filterscript
Under
pawn Code:
#inculde <a_samp>
pawn Code:
forward NoSpawnKill(playerid);
ok now we have to put the player life to 999999 and make a timer for player of 6 second
to public OnPlayerSpawn(playerid)
and add this ...
pawn Code:
SetPlayerHealth(playerid,99999);
pawn Code:
SetTimerEx("NoSpawnKill",6000,0,"i",playerid);
SetTimerEx("NoSpawnKill",6000,0,"i",playerid); = this is for set a timer for playerid is for call a function after some time in this case is 6 second 6000 millisecond
you have to make like this
pawn Code:
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid,99999);
SetTimerEx("NoSpawnKill",6000,0,"i",playerid);
return 1;
}
down of gamemode/filterscript or where u want no up of #include <a_samp> xD
put..
pawn Code:
public NoSpawnKill(playerid)
{
SetPlayerHealth(playerid,100.0);
return 1;
}
if u want to add a message put under SetPlayerHealth(playerid,100.0);
pawn Code:
SendClientMessage(playerid,put a color here,"NoSpawnKill off you have 100.0 life now !");
my frist guide i have to make better one xD bye