Forum
Search
Members
Help
Hello There, Guest!
Login
Username:
Password:
Lost Password?
Remember me
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help
Threaded Mode
Question about timers
SoulRipper113
Little Clucker
Posts: 9
Threads: 2
Joined: Aug 2011
Reputation:
0
#1
10.10.2012, 15:03
Is there any way to check if a timer that has started in OnPlayerEnterCheckpoint as finished when OnPlayerLeaveCheckpoint?
Find
Reply
Niko_boy
High-roller
Posts: 1,336
Threads: 30
Joined: Aug 2010
Reputation:
0
#2
10.10.2012, 15:18
assign the timer an ID
[code]timer[playerid] = SetTimer...// all the code and shit[/QUOTE]
then later when u kill it
Код:
KillTImer(timer[playerid]); timer[playerid] = -1;
so now to check the timer if it exists now just use if( timer[playerid] == -1 ) // willl be true if it is = -1
"timer[playerid]" is just a random array variable , u need to have any good name for it and ofc define it above as a global variable
-gl and try
Find
Reply
SoulRipper113
Little Clucker
Posts: 9
Threads: 2
Joined: Aug 2011
Reputation:
0
#3
10.10.2012, 22:11
Thanks, I'm gonna try that
Find
Reply
«
Next Oldest
|
Next Newest
»
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
SA-MP
-- News and Updates
-- General
-- Client Support
-- Bug Reports
-- Screenshots and Videos
SA-MP Server
-- Server Support
-- Server Advertisements
SA-MP Scripting and Plugins
-- Scripting Help
---- Tutorials
---- Discussion
---- Help Archive
-- Gamemode Scripts
-- Filterscripts
---- Includes
---- Tools and Files
---- Maps
-- Plugin Development
SA-MP DL Edition
-- SA-MP 0.3.DL
---- Model Releases
Other
-- Everything and Nothing
Non-English
-- Languages
---- Nederlands/Dutch
------ Scripting Showroom en Discussie
------ Off topic
---- Español/Spanish
------ Lanzamientos/Releases
---- Français/French
------ Showroom
---- Русский/Russian
------ Релизы/Releases
---- Português/Portuguese
------ Lançamentos/Releases
---- Română/Romanian
------ Salonul Scripturilor
---- Archive
Users browsing this thread: 1 Guest(s)
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help