Help with timer.
#5

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
That piece of code is a bit off, you're calling a callback but without giving it the parameter it looks for? That means this timer will only work for a single person (id 0), because the value of playerid will default to 0 since you're not passing another value to it.

Instead of using SetTimer for this example, you would need to use SetTimerEx and pass an ID along to the callback, like it's expecting you to! For example:

pawn Код:
SetTimerEx("Trolo", 10000, false, "i", playerid);
Depending on what you wish to send of course this could be modified.

Please make sure you're posting proper examples in this section when responding to threads, otherwise people will be mis-lead by in-correct information!

As for the original poster, I recommend instead of waiting for help here, that you use the SA-MP Wiki which has absolutely tons of extremely detailed information on all of the functions you can make use of.

https://sampwiki.blast.hk/wiki/SetTimerEx

That's one you should be looking at right now
Haha okay, will take my time to look at this info :]

EDIT:

Looking over it, im understanding that except one part,

public message(second, msg[])

I know i would replace "message" with my timer's name but what about "second, msg"? i dont think i see anything about it.

Also, activating the timer, when the command is activated. Would the timer still go under OnGameModeInt?
Reply


Messages In This Thread
Help with timer. - by Shockey HD - 23.07.2011, 05:24
Re: Help with timer. - by Kitten - 23.07.2011, 05:32
Re: Help with timer. - by Shockey HD - 23.07.2011, 05:38
Re: Help with timer. - by JaTochNietDan - 23.07.2011, 05:43
Re: Help with timer. - by Shockey HD - 23.07.2011, 05:44
Re: Help with timer. - by JaTochNietDan - 23.07.2011, 13:27

Forum Jump:


Users browsing this thread: 4 Guest(s)