Fixes2 - [Continuous Development] -
Ciandlah - 19.04.2015
Fixes2 - 19-04-2015
Next Release Date: 1-5-2015
Next Version: 2.1
I have decided that due to the that Yless has up and left the SAMP community for his reasons that noone is entitled to know unless he tells you, that I will continue to update his Fixes plugin. I personally had a couple of problems with the overall development that certain tasks could be added into this plugin to be fixed.
If you have any problems or bugs please do not be scared to place a message down below or Private Message me. For people who will post down below saying you cannot replace Y_Less, I know that I cant however I will try my best to keep certain plugins going.
ORIGINAL POST
So I decided to write some more function fixes in a plugin as it's simpler. The first on my list were "SetTimer" and "SetTimerEx". Namely the fact that they are not very accurate and that they don't correctly support strings and arrays. Both these problems are now fixed to the best of my ability. I should note that the accuracy is still a little off because of the "sleep" call in the server internally, but they're MUCH better now.
I've also improved their performance through the use of "std :: priority_queue" so the next timers to trigger are always at the top of the list.
A note when passing arrays, as with "CallLocalFunction" you MUST follow the array with its length as an extra parameter or the system has no way to know how big it is:
Code:
SetTimerEx("func", 1000, 0, "ai", arr, sizeof (arr));
These functions are not changed in ANY way, "0" still means "run once", anything else still means "run forever". You don't even need to recompile to use the new versions, just use the plugin.
I've also added two new functions:
Code:
SetTimer_("func", 100, 1000, -1);
SetTimerEx_("func", 100, 1000, -1, "i", 42);
These versions of the function have more control over exactly what you can do. There are now two time parameters - initial delay and interval. So the functions above will be called after 100ms and then every 1000ms after that. This is useful if you have a few global timers so they don't all run at the same time:
Code:
SetTimer_("global1", 250, 1000, -1);
SetTimer_("global2", 500, 1000, -1);
SetTimer_("global3", 750, 1000, -1);
SetTimer_("global4", 1000, 1000, -1);
Those timers will all run once every 1 second, but will all be offset from each other by 250ms. This feature was already provided by y_timers, but is now more native. Additionally, the "repeat" parameter ("-1" above) is now a COUNT. So if you do:
Code:
SetTimer_("global1", 250, 1000, 4);
Then that function will run EXACTLY FOUR times and no more. You can set this parameter to "0", but unlike the normal versions, this means "never run" and is thus pointless! "-1" means "run forever". The natives for these functions are:
Code:
native SetTimer_(const func[], const delay, const interval, const count);
native SetTimerEx_(const func[], const delay, const interval, const count, const format[], {Float, _}:...);
native KillTimer_(timer) = KillTimer;
This plugin is slightly magical: if you use it you don't need to recompile your mode at all. Just add this to your "plugins" line and it will improve all existing timers in all existing modes. Obviously if you want to use the "_" versions of the functions you'll need to change things.
CHANGES / UPDATES
Version 2.1b list to be added on the 1-5-2015 4 hours before the update release
At the moment you will only be able to download the .DLL and .SO due to this will be a continous development in updating the plugin for you all:
VERSION 2.0 FIXES
DROP BOX:
DOWNLOAD CLICK HERE
GITHUB:
https://github.com/CallistoGaming/Fixes2
Re: Fixes2 - [Continuous Development] -
Uberanwar - 19.04.2015
Good to see that someone is continuing the development. Great job
Re: Fixes2 - [Continuous Development] -
Ciandlah - 19.04.2015
Quote:
Originally Posted by Uberanwar
Good to see that someone is continuing the development. Great job
|
Yeah mate, I thought that while he left, most servers still actually require this plugin. Hence why im continuing it, with the added new fixes coming in the next update.
Re: Fixes2 - [Continuous Development] -
Sithis - 19.04.2015
Great! Please consider using GitHub for code hosting, that way other devs can help you out!
Re: Fixes2 - [Continuous Development] -
Misiur - 19.04.2015
https://github.com/Southclaw/fixes2
As I can see Zeex already patched one bug, and source is required with releases.
Re: Fixes2 - [Continuous Development] -
AdamsP - 19.04.2015
Thank you very much for this!
Re: Fixes2 - [Continuous Development] -
KingHual - 19.04.2015
Quote:
I've also improved their performance through the use of "std :: priority_queue" so the next timers to trigger are always at the top of the list.
|
https://github.com/Southclaw/fixes2/....cpp#L157-L164
This is already a thing that the original fixes2 has.
Re: Fixes2 - [Continuous Development] -
DevinPatino - 20.04.2015
I'll be using this! Great work maybe you should keep up with your projects on GitHub might be easyer for you. Rep for your work for continuing the project.
Re: Fixes2 - [Continuous Development] -
Ciandlah - 20.04.2015
Quote:
Originally Posted by KingHual
|
Please keep in mind that the post above is the original post with the added passage of my statement. Updating the topic tonight - Earlier release of 2.1b will be tomorrow night with a small patch. It will be added to my github though for public eyes
Re: Fixes2 - [Continuous Development] -
Ciandlah - 28.04.2015
Fixes 2.1b will be released on Friday, make sure you update your Fixes2 plugin.
This current fixes will be from bug reports I have looked over on the forum section.
Code:
Fixed:
# RemoveBuildingForPlayer BUG (Upon command GMX, the new function calls itself once then removes the items then respawns them.)
# Small In-Game Bugs that are a suprise so download to find out on friday
Re: Fixes2 - [Continuous Development] -
giorgosdim12 - 02.05.2015
Good work man!
Re: Fixes2 - [Continuous Development] -
Westingham - 28.05.2015
Any word on 2.1b?
Re: Fixes2 - [Continuous Development] -
Eatmysmoke - 19.10.2015
I just wanted to take the time to say thank you this resolved my timers issue 100% so Thank you I hope you keep up the awesome work #LoveToTheSampCommunity
Re: Fixes2 - [Continuous Development] -
DeitY - 06.11.2015
Are you still developing this?
Re: Fixes2 - [Continuous Development] -
Riwerry - 30.12.2015
I guess I maybe found the bug? I'm having this timer:
pawn Code:
gMaintenanceTimer = SetTimer("UpdateMaintenanceCountdown", 1000, true)
And inside of this public function I'm having KillTimer(gMaintenanceTimer); It's getting called / I don't have it under any condition or smth.
But, timer still going.
Re: Fixes2 - [Continuous Development] -
CantBeJohn - 04.12.2016
Quote:
Originally Posted by Riwerry
I guess I maybe found the bug? I'm having this timer:
pawn Code:
gMaintenanceTimer = SetTimer("UpdateMaintenanceCountdown", 1000, true)
And inside of this public function I'm having KillTimer(gMaintenanceTimer); It's getting called / I don't have it under any condition or smth.
But, timer still going.
|
Having the same issue, if I attempt to kill a timer within the public function it's calling; it won't kill it and constantly keep calling it.
Then again, the last update on this was last year. Figured I'd post here anyways. You should have probably informed everyone you weren't going to continue developing this though.
Re: Fixes2 - [Continuous Development] -
Freaksken - 05.12.2016
Use
this plugin instead.
Re: Fixes2 - [Continuous Development] -
J0sh... - 05.12.2016
Quote:
Originally Posted by CantBeJohn
Having the same issue, if I attempt to kill a timer within the public function it's calling; it won't kill it and constantly keep calling it.
Then again, the last update on this was last year. Figured I'd post here anyways. You should have probably informed everyone you weren't going to continue developing this though.
|
Don't load the plugin.