PVar with SetTimerEx
#1

Hi.

I wanted to ask if there's a problem (or maybe is that way) with PVar's and SetTImerEx, because I create a Pvar like:
pawn Код:
SetPVarInt(playerid,"timer1",SetTimerEx("TIMER",1000,true,"i",playerid));
But the timer never starts.

Are PVars and timers incompatible or am I doing something wrong?


EDIT:

I think I've found the error. Im creating the PVar calling a function that is in another script.
How can I initiate a timer inside another Filterscript?

The solution im using now is calling a remote function from the filterscript to the gamemode and this function creating the timer, like:

Inside Filterscript:
pawn Код:
CallRemoteFunction("function","i",playerid);
Inside Gamemode:
pawn Код:
forward function(playerid);

public function(playerid)
{
    timer[playerid] = SetTimerEx("timer",1000,true,"i",playerid);
    return 1;
}
Reply
#2

Pretty sure its because for the time you put 10 00
Reply
#3

Quote:
Originally Posted by PrawkC
Посмотреть сообщение
Pretty sure its because for the time you put 10 00
No, that is a sentence I wrote for the forum and is the page that shows the number wrong. I've tried to edit the sentence but in the edit section looks good, and when I submit the post it shows like "10 00" but it says "1000".

EDIT: I had to put the sentence inside the "PAWN" tag because it showed the number wrong.
Reply
#4

show me the function "TIMER"
Reply
#5

The code im showing you is the same code i have inside my script, but with the variable names.

The problem is not the functions or the variables... im just asking if anyone knows a better way to call a timer from another script without doing what im doing here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)