SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 09/05/2013, 01:04 PM   #21
Dan..
Gangsta
 
Join Date: Jun 2012
Location: Galati, Romania
Posts: 521
Reputation: 122
Default Re: Timerfix plugin - A fix for every ttime related issue

I've released v1.2. This fixes all player timers related issues. If you use them, please update!

Quote:
Originally Posted by Rajat_Pawar View Post
Thanks, it's good. I don't know if it matters to you, but some reputation, you have earned! Cheers. Also, could you mind PMing me and sharing a few pointers with me about plugins? Writing them? Seeing that you are a plugin guy! (No, I don't want a link to the plugin tutorial.)
Well.. I started reading that plugin tutorial. I really don't know any better learning material.

Quote:
Originally Posted by Luis- View Post
What would I do if I was too repeat the timer? I see nothing related to repeating.
Please read the documentation. There is a "repeating" paramter.
__________________
I'm no longer visiting these forums. BlueG, you can suck my dick.
Dan.. is offline   Reply With Quote
Old 09/05/2013, 01:06 PM   #22
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 3,928
Reputation: 401
Default Re: Timerfix plugin - A fix for every ttime related issue

Ah, thanks!
__________________


| Home | Server | Forum | Trailer |
Luis- is offline   Reply With Quote
Old 09/05/2013, 01:13 PM   #23
Edvin
Gangsta
 
Edvin's Avatar
 
Join Date: Dec 2010
Posts: 856
Reputation: 71
Default Re: Timerfix plugin - A fix for every ttime related issue

Quote:
Originally Posted by Dan.. View Post
* This plugin also adds new natives (player timers, which are automatically killed when the player disconnects; there is a hook in the include file), which require `timerfix` include file.
This per-player timers are very useful (i think i will use they in the future). I know per-player timers are scriptable, but in my opinion, everything made in C++(plugin, like these functions) are more accurately than in pawn. Good Job !
Edvin is offline   Reply With Quote
Old 09/05/2013, 01:19 PM   #24
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 3,928
Reputation: 401
Default Re: Timerfix plugin - A fix for every ttime related issue

I just updated to v1.2 to find I couldn't connect to my server, reverted back to v1.1 and could connect.
__________________


| Home | Server | Forum | Trailer |
Luis- is offline   Reply With Quote
Old 09/05/2013, 05:56 PM   #25
Dan..
Gangsta
 
Join Date: Jun 2012
Location: Galati, Romania
Posts: 521
Reputation: 122
Default Re: Timerfix plugin - A fix for every ttime related issue

Quote:
Originally Posted by Luis- View Post
I just updated to v1.2 to find I couldn't connect to my server, reverted back to v1.1 and could connect.
Can you post your server_log.txt? I tested on multiple servers and it works fine.
__________________
I'm no longer visiting these forums. BlueG, you can suck my dick.
Dan.. is offline   Reply With Quote
Old 26/05/2013, 07:29 PM   #26
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,801
Reputation: 375
Default Re: Timerfix plugin - A fix for every ttime related issue

I tested the timers with a 1000ms interval without this plugin and they are executed at a interval of ~1050ms, with this plugin they are at 1000ms +- 5ms (very accurate).

I have a suggestion, this could be useful (at least for me):
pawn Code:
native GetTimerCountLeft( timerid );
/*
    Returns:
-1: infinite timer (basic timers with repeating at 1 or improved timers with count at -1)
0: inexistent timers (timers with execution finished, or which didn't existed at all)
number of counts left: if there are counts left (improved timers)
*/
__________________


IstuntmanI is offline   Reply With Quote
Old 01/07/2013, 01:22 PM   #27
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,831
Reputation: 1401
Default Re: Timerfix plugin - A fix for every ttime related issue

Pretty much a month has passed since the last post, but it's a really great and useful plugin.
I tested it on 1000 milliseconds timer with parameters and it was executed at 995-1005.

I'd like to learn though, how can I use the delay parameter. On the test, I set it to 1000, just like the interval.

Thanks and very good job!

EDIT: On a test at 5000 milliseconds, here's the results:

pawn Code:
[16:41:59] OnServerCheckMoney: 5006
[16:42:04] OnServerCheckMoney: 4773 // Ouch
[16:42:09] OnServerCheckMoney: 4999
[16:42:14] OnServerCheckMoney: 5001
[16:42:19] OnServerCheckMoney: 5003
[16:42:24] OnServerCheckMoney: 4998
[16:42:29] OnServerCheckMoney: 4996
[16:42:34] OnServerCheckMoney: 5004
[16:42:39] OnServerCheckMoney: 4997
[16:42:44] OnServerCheckMoney: 4997
[16:42:49] OnServerCheckMoney: 5001
[16:42:54] OnServerCheckMoney: 5002
[16:42:59] OnServerCheckMoney: 4998
[16:43:04] OnServerCheckMoney: 5000
[16:43:09] OnServerCheckMoney: 4997
[16:43:14] OnServerCheckMoney: 5002
[16:43:19] OnServerCheckMoney: 4993
[16:43:24] OnServerCheckMoney: 5004
[16:43:29] OnServerCheckMoney: 4914
[16:43:34] OnServerCheckMoney: 4994
[16:43:39] OnServerCheckMoney: 5000
[16:43:44] OnServerCheckMoney: 5001
[16:43:49] OnServerCheckMoney: 4997
[16:43:54] OnServerCheckMoney: 5000
[16:43:59] OnServerCheckMoney: 5003
[16:44:04] OnServerCheckMoney: 4998
[16:44:09] OnServerCheckMoney: 4996
[16:44:14] OnServerCheckMoney: 5001
[16:44:19] OnServerCheckMoney: 5001
[16:44:24] OnServerCheckMoney: 4996
[16:44:29] OnServerCheckMoney: 5000
[16:44:35] OnServerCheckMoney: 5003
[16:44:39] OnServerCheckMoney: 3703 // OUCH!
[16:44:44] OnServerCheckMoney: 4998
[16:44:49] OnServerCheckMoney: 5001

Excluding these 2 results, the rest of it seems to be good enough!
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 01/07/2013, 01:41 PM   #28
Gigi-The-Beast
Huge Clucker
 
Join Date: Jan 2010
Posts: 223
Reputation: 25
Default Re: Timerfix plugin - A fix for every ttime related issue

The delay should be the time that is required to pass after which the timer will start working.
Example: delay 5 sec, timer 1sec
5 seconds will pass and then a 1 second timer will start working.
Gigi-The-Beast is offline   Reply With Quote
Old 20/07/2013, 03:32 PM   #29
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,801
Reputation: 375
Default Re: Timerfix plugin - A fix for every ttime related issue

Quote:
Originally Posted by IstuntmanI View Post
I have a suggestion, this could be useful (at least for me):
pawn Code:
native GetTimerCountLeft( timerid );
/*
    Returns:
-1: infinite timer (basic timers with repeating at 1 or improved timers with count at -1)
0: inexistent timers (timers with execution finished, or which didn't existed at all)
number of counts left: if there are counts left (improved timers)
*/
Also, another one:
pawn Code:
native GetTimerIntervalLeft( timerid );
/*
    Returns:
0: inexistent timers (timers with execution finished, or which didn't existed at all)
interval left: how many milliseconds left until the timer is called again
*/

Well... ?
__________________


IstuntmanI is offline   Reply With Quote
Old 29/07/2013, 11:29 AM   #30
Edvin
Gangsta
 
Edvin's Avatar
 
Join Date: Dec 2010
Posts: 856
Reputation: 71
Default Re: Timerfix plugin - A fix for every ttime related issue

I have a problem. I have this in my script:
Code:
mytimer[playerid] = SetPlayerTimerEx(playerid, "FunctionName", 990, true, "i", playerid);
And after, in OnDialogResponse i use:
Code:
KillPlayerTimer(mytimer[playerid]);
to kill the repeating process, but i don't know why, the timer aren't getting destroyed. It still repeats... It's a plugin bug, or i did something wrong?
Edvin 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
Idea to avoid all this rep related issue matty1415 General 38 25/04/2013 04:03 AM
Streamer Plugin Issue [rG]Cold Scripting Help 2 20/12/2012 05:23 PM
[PROBLEM] Probably related to audio plugin blackwave Help Archive 3 30/12/2010 07:05 PM
Win7 Related Issue Johny_James Everything and Nothing 13 11/12/2010 02:41 PM
Server error...Plugin compilation related. XPlatform Plugin Development 1 15/11/2009 12:28 PM


All times are GMT. The time now is 03:46 PM.


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