| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 7,873
» Latest member: Kewun
» Forum threads: 2,385
» Forum posts: 12,289
Full Statistics
|
| Online Users |
There are currently 410 online users. » 0 Member(s) | 407 Guest(s) Bing, Google, Yandex
|
| Latest Threads |
Verona Community open ser...
Forum: Advertisements
Last Post: pmemorex2016
Yesterday, 01:47 PM
» Replies: 0
» Views: 19
|
Verona Community otvaranj...
Forum: Ex-Yu
Last Post: pmemorex2016
Yesterday, 01:43 PM
» Replies: 0
» Views: 27
|
Aurora RP/CNR
Forum: Advertisements
Last Post: Kewun
Yesterday, 07:24 AM
» Replies: 0
» Views: 25
|
GameText styles in open.m...
Forum: Pawn Scripting
Last Post: Kar
Yesterday, 03:53 AM
» Replies: 3
» Views: 1,303
|
Asking something
Forum: General Discussions
Last Post: ALE11
2026-01-20, 03:49 PM
» Replies: 0
» Views: 16
|
PROJECT: LOS ANGELES — TH...
Forum: Advertisements
Last Post: DevonH
2026-01-18, 07:01 PM
» Replies: 11
» Views: 1,185
|
After School Roleplay - L...
Forum: Advertisements
Last Post: cosminupgaming
2026-01-18, 05:50 PM
» Replies: 10
» Views: 821
|
Las Venturas Gang Wars - ...
Forum: Advertisements
Last Post: lvgwgta
2026-01-17, 08:36 PM
» Replies: 0
» Views: 43
|
Can't even view list of s...
Forum: General Discussions
Last Post: thomasgolden
2026-01-16, 04:32 AM
» Replies: 0
» Views: 64
|
Proyecto SA-MP Medieval: ...
Forum: Discusi?n GTA SA Multijugador
Last Post: harkonstraus0219
2026-01-16, 03:15 AM
» Replies: 0
» Views: 54
|
|
|
| Timers module |
|
Posted by: Y_Less - 2019-05-22, 03:15 PM - Forum: Development Updates
- Replies (32)
|
 |
This is a sneak-peek at one of the improved modules we've done, for timers in open.mp:
PHP Code: native SetTimer(const func[], msInterval, bool:repeat) = SetTimerEx; native SetTimerEx(const func[], msInterval, bool:repeat, const params[], GLOBAL_TAG_TYPES:...); native KillTimer(timer) = Timer_Kill;
// CreateTimer native Timer:Timer_Create(const func[], usDelay, usInterval, repeatCount, const params[] = "", GLOBAL_TAG_TYPES:...);
// KillTimer native bool:Timer_Kill(Timer:timer);
// Return time till next call. native Timer_GetTimeRemaining(Timer:timer);
// Get number of calls left to make (0 for unlimited). native Timer_GetCallsRemaining(Timer:timer);
// Get `repeatCount` parameter. native Timer_GetTotalCalls(Timer:timer);
// ?Get `usInterval` parameter. native Timer_GetInterval(Timer:timer);
// Reset time remaining till next call to `usInterval`. native bool:Timer_Restart(Timer:timer);
The first two are just for backwards-compatibility, the rest are the improved API:
PHP Code: native Timer:Timer_Create(const func[], usDelay, usInterval, repeatCount, const params[] = "", GLOBAL_TAG_TYPES:...);
- `func` - Fairly obvious; what to call.
- `usDelay` - Again obvious, the delay before the call (in microseconds).
- `usInterval` - What to reset `usDelay` to after the first call. ?So if you wanted a timer on the hour every hour, but it was 8:47am right now, the call would be `Timer_Create("OnTheHour", 780 SECONDS, 3600 SECONDS, 0);`
- `repeatCount` - Unlike the old functions, which are just "once" or "forever", this instead takes the number of times to call the function. ?"once" would be `1`, `500` would stop after 500 calls, and (backwards from the old API) `0` means "forever".
- `GLOBAL_TAG_TYPES` - Like `{Float, ...}`, but with more tags.
|
|
|
|
| Animation manipulating? |
|
Posted by: Caledonite - 2019-05-21, 03:08 PM - Forum: Questions and Suggestions
- Replies (1)
|
 |
Hi.
Since I've always wondered how would the hand holding exactly work in GTA SA, as seen on this picture:
![[Image: qIBOjCb.jpg]](http://i.imgur.com/qIBOjCb.jpg)
(curse the Google!)
This also includes how it is possible for peds to back up slowly while shooting (this includes backing up while crouching).?
I think this should be possible to be in multiplayer scripting as well. Pretty sure there are more animations that "aren't in libraries", for example hand holding (I have never seen this in any anim library, but maybe I'm wrong).
Thoughts, questions, comments?
|
|
|
|
| Some sort of unique id for vehicles |
|
Posted by: XeroX - 2019-05-21, 10:52 AM - Forum: Questions and Suggestions
- Replies (1)
|
 |
hi,
so currently in samp you have vehicle ids the problem is that they could potentionally change and another vehicle takes over that id which may not be wanted. So im suggesting some sort of unique id for vehicles that will always (unless DestroyVehicle, FS /GM Unload happens) "point" to that specific vehicle no matter what happens. This could be added in the /dl command and with GetVehicleUID you could retrieve it.
|
|
|
|
| samp-precise-timers ?: A timer plugin written in Rust |
|
Posted by: bmisiak - 2019-05-21, 05:36 AM - Forum: Plugins
- Replies (16)
|
 |
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!
|
|
|
|
|