• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plugin] samp-precise-timers ?: A timer plugin written in Rust
#1
samp-precise-timers ?
github.com/bmisiak/samp-precise-timers


Briefly
Developed for net4game.com (RolePlay), this plugin provides precise timers for the server. It is written in Rust, a memory-safe language.

Why rewrite timers?
I had a lot of safety concerns with some of the existing solutions. They weren't written with data integrity, memory safety or preventing server crashes in mind and seemed to have quite a few bugs. As privacy and safety is our primary concern at net4game, I wrote this in Rust, which combines high-level ergonomics with the performance of a low-level language. ?

Please check out the code to see the benefits. You might like Rust a lot. The code is much simpler than C equivalents, especially the ones which still use *char, free() and delete[] instead of modern C idioms such as std::unique_ptr, but as Rust has no runtime, there is no overhead ??

We would like your help! ??
Oh, and if you enjoy working on servers, we are looking for a team to help our international expansion. ??? net4game has been around for a decade as the biggest Polish server. We introduced a lot of innovations over the years and we are almost ready to become international. Shoot me an e-mail at [email=bm犇@net4game.com]bm犇@net4game.com[/email] if you're interested.

Downloads on GitHub
Also available on sampctl as
Code:
bmisiak/samp-precise-timers

On top of all of the above, I would love to help with?developing?open.mp!
  Reply
#2
Finally made it over here, huh? :D



Nice work, especially since it's written in Rust uwu
Remember to always refer to J0sh as `J0sh...`



@ Networks/Servers

San Andreas Gaming Network (Owner/Founder)

San Andreas Gaming (Owner/Founder)

Grand Theft Cop's n Robber's (Owner)

Britannia Roleplay (Owner/Founder) [Retired]

Alpine RP (Owner/Founder)

Aluminium Network (Maintainer) [Disbanded]

AlphaDM (Tech Support) [Disbanded]



# Services

forum.open.mp (Forum Manager) (Formerly Burgershot.gg

open.mp (Member)



~ Languages/Frameworks

Pawn, C, C, C#, Javascript, Typescript, Lua, Python, Go, Rust, PHP, SQL,

Angular, React, Vue, Svelte, Laravel, Rocket
  Reply
#3
Welcome, Misiek. Why not drop by our Discord as well?
  Reply
#4
Very nice.I'm impressed by how simple the code is compared to other versions.
  Reply
#5
(2019-05-21, 05:36 AM)bmisiak Wrote: Oh, and if you enjoy working on servers, we are looking for a team to help our international expansion.



Great! And you have a mumble server too! I wish I knew Polish :(
  Reply
#6
I don't know Rust, but the code is self-explanatory by reading the comments, great job!
  Reply
#7
Nice!
  Reply
#8
Finally, here?s a great plugin! Nice job???
  Reply
#9
Think I'll try it out.
  Reply
#10
Great job! ;>
  Reply
#11
Thanks y'all! Definitely looking for some feedback. ??



(2019-05-21, 11:27 AM)ohmios Wrote: Great! And you have a mumble server too! I wish I knew Polish :(

FOSS all the way! Obviously for the international expansion we will need people who speak English, not Polish, so this is not a concern! ??
  Reply
#12
There seems to be a problem with the Linux version.


Code:
[sampgdk:warning] Native function not found: GetPlayerInterior
[sampgdk:warning] Native function not found: GetPlayerVirtualWorld
[sampgdk:warning] Native function not found: GetPlayerState

This only happens when loading this plugin and only on Linux.
Other plugins I use and their order is as follows:?crashdetect.so mysql.so samp-previse-timers.so sscanf.so streamer.so regex.so
All of them are on their latest versions.
  Reply
#13
A small benchmark of this plugin.

https://gist.github.com/markski1/13444ef...f186fafd0f

Might be the most accurate and consistent timer option, even than timerfix. Good job.
  Reply
#14
(2019-05-22, 10:09 AM)Hoxxy Wrote: There seems to be a problem with the Linux version.





Code:
[sampgdk:warning] Native function not found: GetPlayerInterior

[sampgdk:warning] Native function not found: GetPlayerVirtualWorld

[sampgdk:warning] Native function not found: GetPlayerState



This only happens when loading this plugin and only on Linux.

Other plugins I use and their order is as follows:?crashdetect.so mysql.so samp-previse-timers.so sscanf.so streamer.so regex.so

All of them are on their latest versions.



Yes this started happening to me since I moved to this plugin, at first I thought that the streamer was causing the problem, but now..

I'm getting:



[sampgdk:warning] Native function not found: DeletePlayer3DTextLabel
  Reply
#15
For some reason, sometimes the timers are never placed, mostly when it's deleted and replaced.
  Reply
#16
(2019-07-29, 11:20 AM)RogueDrifter Wrote: For some reason, sometimes the timers are never placed, mostly when it's deleted and replaced.

True, haven't got time to figure it out?so I switched back to settimer. But after some time it started wierding up and not even starting timers.
  Reply
#17
Nice Misiak, I appreciate your honest work!

Love from Poland :)))
Away
  Reply


Forum Jump: