AntiSK problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: AntiSK problem (
/showthread.php?tid=275341)
AntiSK problem -
Jay. - 09.08.2011
hey, I made an anti-spawnkill script, very small.
pawn Код:
//public OnPlayerSpawn(playerid)
GameTextForPlayer(playerid,"~G~spawn protection",1000,5);
SetPlayerHealth(playerid,INFINITE);
AntiSK[playerid] = SetTimerEx("SPOver",1,10000,"d",playerid);
return 1;
}
forward SPOver(playerid);
public SPOver(playerid)
{
GameTextForPlayer(playerid,"~R~spawn protection over",1000,5);
SetPlayerHealth(playerid,100);
KillTimer(AntiSK[playerid]);
}
The problem is when I spawn the timer will just say
"spawn protection over" so the first bit doesn't work.
it just goes straight to the timer, does anyone know the problem?
I tried thinking about it last night and had a few ideas but they probably wont work and i've already tried alot of other things actually.
I thought it might be because my script is in a filterscript.
But that can't be can it ? as I have other functions under there which work perfectly.
and the timer works..
Before you ask , yes I do have the variable
AntiSK.
Any idea of the problem ?
Thanks in advance.
Re: AntiSK problem -
Wesley221 - 09.08.2011
Take a good look at your timer.
pawn Код:
SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...)
U switched the interval with repeating. Its only effective for 1 second.
Re: AntiSK problem -
Jay. - 09.08.2011
Quote:
Originally Posted by Wesley221
Take a good look at your timer.
pawn Код:
SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...)
U switched the interval with repeating. Its only effective for 1 second.
|
Oh my god!
I hadn't scripted in a long time and had forgot where some things go..
But I can't believe I didn't notice that.
Thanks , im so stupid.