[Plugin] Timerfix plugin - A fix for every ttime related issue
#21

Quote:
Originally Posted by Edvin
Посмотреть сообщение
I have a problem. I have this in my script:
Код:
mytimer[playerid] = SetPlayerTimerEx(playerid, "FunctionName", 990, true, "i", playerid);
And after, in OnDialogResponse i use:
Код:
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?
Are you sure that mytimer[playerid] isn't overwritten and the reference to the old timer is lost?
Reply
#22

Quote:
Originally Posted by Dan..
Посмотреть сообщение
Are you sure that mytimer[playerid] isn't overwritten and the reference to the old timer is lost?
Sure!
Reply
#23

If I use SetTimer() is this native being redirect through the plugin or do I need to use SetTimer_() ?
Also GetTickCount()?
Reply
#24

SetTimer() and GetTickCount() were both replaced.
Reply
#25

I'm using it and it's perfect! Thanks for that.

Quote:
Originally Posted by Dan..
Посмотреть сообщение
SetTimer() and GetTickCount() were both replaced.
Was SetTimerEx replaced too?
Reply
#26

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
I'm using it and it's perfect! Thanks for that.



Was SetTimerEx replaced too?
Yes I just looked at his code:
Код:
PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx) {
amx_Redirect(amx, "SetTimer", (ucell) Natives::SetTimer, NULL);
amx_Redirect(amx, "SetTimerEx", (ucell) Natives::SetTimerEx, NULL);
amx_Redirect(amx, "KillTimer", (ucell) Natives::KillTimer, NULL);
amx_Redirect(amx, "GetTickCount", (ucell) Natives::GetTickCount, NULL);
return amx_Register(amx, NATIVES, -1);
}
Reply
#27

Alright! Thanks, Mellnik.
Reply
#28

When I load v1.3 the server crashes while loading the plugin. v1.2 works fine.

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team

[00:01:05] 
[00:01:05] Server Plugins
[00:01:05] --------------
[00:01:05]  Loading plugin: sscanf.so
[00:01:05] 

[00:01:05]  ===============================

[00:01:05]       sscanf plugin loaded.     

[00:01:05]          Version:  2.8.1        

[00:01:05]    © 2012 Alex "******" Cole  

[00:01:05]  ===============================

[00:01:05]   Loaded.
[00:01:05]  Loading plugin: irc.so
[00:01:05] 

*** IRC Plugin v1.4.3 by Incognito loaded ***

[00:01:05]   Loaded.
[00:01:05]  Loading plugin: streamer.so
[00:01:05] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[00:01:05]   Loaded.
[00:01:05]  Loading plugin: timerfix.so
Reply
#29

Quote:
Originally Posted by Mellnik
Посмотреть сообщение
When I load v1.3 the server crashes while loading the plugin. v1.2 works fine.

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team

[00:01:05] 
[00:01:05] Server Plugins
[00:01:05] --------------
[00:01:05]  Loading plugin: sscanf.so
[00:01:05] 

[00:01:05]  ===============================

[00:01:05]       sscanf plugin loaded.     

[00:01:05]          Version:  2.8.1        

[00:01:05]    © 2012 Alex "******" Cole  

[00:01:05]  ===============================

[00:01:05]   Loaded.
[00:01:05]  Loading plugin: irc.so
[00:01:05] 

*** IRC Plugin v1.4.3 by Incognito loaded ***

[00:01:05]   Loaded.
[00:01:05]  Loading plugin: streamer.so
[00:01:05] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[00:01:05]   Loaded.
[00:01:05]  Loading plugin: timerfix.so
That's odd. I'll recompile and check for missing dependencies.

EDIT: Fixed!
Reply
#30

I think there's an issue with version 1.2 in Linux when repeating parameters is on true.

In Windows, something I've made is executed every 3 minutes and it goes like that:
pawn Код:
2:20:45 // it was executed
2:23:45 // it was executed
2:26:45 // it was executed
2:29:45 // it was executed
In linux, it goes like that:
pawn Код:
2:20:45 // it was executed
2:23:43 // it was executed
2:26:41 // it was executed
2:29:39 // it was executed
It's been reduced by 2 seconds everytime is repeated.

I'm going to use v1.3 and I'll edit back.
Reply
#31

The link is not work (.dll, .so)
Reply
#32

I'd appreciate if you could make the .so file for Linux!
Reply
#33

Quote:
Originally Posted by totar
Посмотреть сообщение
The link is not work (.dll, .so)
Fixed.

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
I'd appreciate if you could make the .so file for Linux!
It's there already.
Reply
#34

How to replace this?
SetTimerEx("OnPlayerConnectEx", 5000, false, "i", playerid);

SetTimerEx_("OnPlayerConnectEx", 0, 5000, 0, "i", playerid);
Reply
#35

You don't have to edit anything. This is a drop-in replacement. All you have to is load it (add to server.cfg).
Reply
#36

This SetTimerEx("OnPlayerConnectEx", 5000, false, "i", playerid); freeze the server!
Reply
#37

Quote:
Originally Posted by totar
Посмотреть сообщение
This SetTimerEx("OnPlayerConnectEx", 5000, false, "i", playerid); freeze the server!
If you disable this plugin the problem still occurs?
Reply
#38

Then the problem is resolved!
Reply
#39

Quote:
Originally Posted by Typhome
Посмотреть сообщение
https://github.com/udan11/samp-plugin-timerfix/issues/2

It's now fixed, i hope that bug wont appear. Guys, please use github issue, then this plugin developer can check and fix it.
Great ! I thought he isn't working on SA:MP anymore.

Waiting now for the binaries.
Reply
#40

https://github.com/udan11/samp-plugin-timerfix/releases
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)