AntiSK problem
#1

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

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.
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)