SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 25/03/2017, 07:18 PM   #1
NeXoR
Gangsta
 
Join Date: Jun 2013
Posts: 577
Reputation: 20
Default Timer ID stored in a variable gets wiped when timer hits ?

Lets say I have something like this:

PHP Code:
new TimerID SetTimer("BlaBla"10000);
BlaBla();

BlaBla()
{
if(
TimerID// If the timer ID is still stored in the variable > the timer wasnt executed yet
{
KillTimer(TimerID);
// blablabla
}

If I call a timer, and store it's ID in a variable
When the function of the Timer is called (Timer is finished)
The Timer ID is still stored in the variable ?
__________________
My Releases
[FilterScript] NexAdmin Administration FS [MySQL] [SSCANF] [ZCMD]
[FilterScript] NexBank - Advanced Money System [ATMs] [Anti-Money Hack] [MySQL] [ZCMD]


Currently working on:
[GameMode] Military VS Terrorists
NeXoR is offline   Reply With Quote
Old 25/03/2017, 07:19 PM   #2
Mencent
High-roller
 
Mencent's Avatar
 
Join Date: Mar 2015
Location: Lower Saxony (Niedersachsen)
Posts: 1,320
Reputation: 92
Default Re: Timer ID stored in a variable gets wiped when timer hits ?

Hello!

When the timer is finish you needn't kill the timer because it is still killed.
__________________
Best wishes,
Mencent

(Sorry for my bad english, I hope you can understand this!)
Mencent is offline   Reply With Quote
Old 25/03/2017, 07:22 PM   #3
NeXoR
Gangsta
 
Join Date: Jun 2013
Posts: 577
Reputation: 20
Default Re: Timer ID stored in a variable gets wiped when timer hits ?

Nevermind Solved
I just switched the Timer ID variable in a function local variable
__________________
My Releases
[FilterScript] NexAdmin Administration FS [MySQL] [SSCANF] [ZCMD]
[FilterScript] NexBank - Advanced Money System [ATMs] [Anti-Money Hack] [MySQL] [ZCMD]


Currently working on:
[GameMode] Military VS Terrorists
NeXoR is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which is better Per Player Timer or Global timer? (issue with timer) Dokins Scripting Help 4 07/06/2016 09:50 AM
local or global variable in a timer/Using enum as integer xVIP3Rx Scripting Help 9 25/07/2015 02:44 PM
Timer stops incrementing variable after a while. Hoborific Scripting Help 2 27/02/2014 07:15 AM
GameTextForPlayer @ timer and Saving a PlayerInfo variable. KnooL Help Archive 0 05/12/2009 01:11 PM
GameTextForPlayer @ timer and Saving a PlayerInfo variable. KnooL Help Archive 0 05/12/2009 11:08 AM


All times are GMT. The time now is 05:58 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.