Skip to content

Releases: bmisiak/samp-precise-timers

v3.1.1: regression fix

27 Jul 06:48
Compare
Choose a tag to compare

This release fixes a v3 regression reported in issue #17, where parameters would be passed incorrectly.

samp-precise-timers v3.0.0

21 Feb 10:52
Compare
Choose a tag to compare

This version keeps track of the next timer to be triggered, avoiding iterating over all of them on each tick. Also respects Rust's aliasing rules better.

Breaking changes

  • Non-repeating timers are removed immediately when triggered, and when their callback is called, the timer ID is already invalid. You can't use ResetPreciseTimer, DeletePreciseTimer with it. If you kept the ID returned from SetPreciseTimer("SomeCallback",1000,false), make sure to invalidate it as soon as you receive the callback.

v2.1.0: ResetPreciseTimer

29 Jul 21:32
Compare
Choose a tag to compare
  • Adds ResetPreciseTimer:
native ResetPreciseTimer(timer_number, const interval, const bool:repeat)

Support for older CentOS & Windows

30 Jun 22:11
2f01f83
Compare
Choose a tag to compare

CentOS 7 ships with glibc 2.17. The plugin used to be built against glibc 2.18, which caused failure to load on CentOS. Version 2.0.2 is built against glibc 2.15, which should work fine on CentOS, fixing issue #9

Now includes both the Linux .so and Windows .dll.

Fix for `Native function not found`

30 Jun 01:59
ae3dbae
Compare
Choose a tag to compare

Hello.
As was discovered in issue #7, sampgdk makes certain assumptions about pointer lifetimes. This caused an incompatibility with samp-rs. I upgraded to its new version with a workaround, so using samp-precise-plugins in tandem with certain other plugins will no longer cause Native function not found to appear.

2.0.0

21 May 02:31
Compare
Choose a tag to compare
  • Unrecognized type letters will be treated as a primitive cell (fix #2).
  • Breaking change in array support to make it compatible with existing solutions (fix #1). Example:
public OnGameModeInit()
{
    new meaningOfLife[2];
    meaningOfLife[0] = 42;
    meaningOfLife[1] = 737;

    // Arrays are always passed as a pair of two letters: aA or ai
    // 'a' contains the actual array.
    // 'A' or 'i' should contain the size of the array, as shown.
    SetPreciseTimer("MeaningOfLife", 1000, false, "daA", playerid, meaningOfLife, sizeof(meaningOfLife));
}

// Callbacks receive the size of the array
forward MeaningOfLife(playerid,array[],array_size)
{
    for(new i = 0; i < array_size; i++)
    {
        printf("array[%d]=%d",i,array[i]);
    }
}

1.1.0: Support for arrays

20 May 07:25
Compare
Choose a tag to compare
  • Support for arrays. Example:
public OnGameModeInit()
{
    new meaningOfLife[2];
    meaningOfLife[0] = 42;
    meaningOfLife[1] = 737;

    // Arrays are always passed as a pair of two letters: Aa.
    // 'A' should contain the size of the array, as shown.
    // 'a' contains the actual array.
    SetPreciseTimer("MeaningOfLife", 1000, false, "dAa", playerid, sizeof(meaningOfLife), meaningOfLife);
}

// Callbacks receive the size of the array
forward MeaningOfLife(playerid,array_size,array[])
{
    for(new i = 0; i < array_size; i++)
    {
        printf("array[%d]=%d",i,array[i]);
    }
}

1.0.0: Initial release

19 May 09:58
Compare
Choose a tag to compare

Does not support arrays, but good to go otherwise. Tested in production on net4game.com.