Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
/ timer-plus Public archive

Library for easy timer use

Notifications You must be signed in to change notification settings

Ramon-Relphi/timer-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.