/timer-plus

Library for easy timer use

Primary LanguagePawn

samp-include



  1. Installation

  2. Documentation



🚀 Installation

You can install the "Timer Plus" library in two ways:

  • Using sampctl: You can install the library using the sampctl package manager. Simply run the following command in the terminal:
sampctl package install Ramon-Relphi/timer-plus
  • Using Git: You can clone the library's Git repository and manually add it to your project. Run the following command in the terminal:
git clone https://github.com/Ramon-Relphi/timer-plus.git

Then, include the "timerplus.inc" include file in your code:

#include "timerplus.inc"


☕ Documentation

Example

#include "timerplus.inc"

// Define Timer Callback
DefTimer:ShowHello() {

    // Print: "Hello, World!"
    printf("Hello, World!");
    
    // Delete Timer
    DeleteTimer("ShowHello");
    return 1;
}

public OnGameModeInit() {

    // Start Timer
    StartTimer("ShowHello", 1000, false);
    return 1;
}

public OnGameModeExit() {
    return 1;
}

main() {
    return 0;
}

This project is licensed. See the LICENSE file for more details.