Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 303 online users. » 0 Member(s) | 300 Guest(s) Bing, Google, Yandex
|
Latest Threads |
Discord server - Ban Appe...
Forum: Chat
Last Post: joshcoconutard
40 minutes ago
» Replies: 0
» Views: 1
|
I know Kalcor left the bu...
Forum: Questions and Suggestions
Last Post: NoxxeR
5 hours ago
» Replies: 4
» Views: 93
|
Desolation Roleplay
Forum: Gamemodes
Last Post: Nikore
Today, 07:04 AM
» Replies: 2
» Views: 4,529
|
Battlefields - TDM (Team ...
Forum: Gamemodes
Last Post: Nikore
Today, 04:14 AM
» Replies: 3
» Views: 2,779
|
Will there be a higher pl...
Forum: General Discussions
Last Post: Armeat2005
Yesterday, 08:40 AM
» Replies: 0
» Views: 28
|
DOF2.1 (DOF2 Updated)
Forum: Libraries
Last Post: GracieStith
Yesterday, 04:51 AM
» Replies: 1
» Views: 865
|
Kontak Layanan CIMB Niaga...
Forum: Support
Last Post: bosquee9053
2025-04-20, 03:44 PM
» Replies: 0
» Views: 25
|
CS Bank DBS Customer Cent...
Forum: Chat
Last Post: bosquee9053
2025-04-20, 03:37 PM
» Replies: 0
» Views: 34
|
Sponsors and Donations
Forum: Questions and Suggestions
Last Post: NoxxeR
2025-04-20, 05:48 AM
» Replies: 0
» Views: 43
|
Best practices for conver...
Forum: Tech
Last Post: Mido
2025-04-19, 09:53 PM
» Replies: 1
» Views: 98
|
|
|
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!
|
|
|
|