Skip to content

Detects airbreak and sends it to a callback. Originally created in October 2012, and updated throughout the years.

License

Notifications You must be signed in to change notification settings

Walter-Correa/OnPlayerAirbreak

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

OnPlayerAirbreak

Simple airbreak detection script for SA-MP. Just include it in your mode and you're ready to go!

Function

You can use this function to check and reset a player's airbreaks count.

//Example
new airbreaks[MAX_PLAYERS];

public OnGameModeInit()
{
    SetTimerEx("ResetAirbreakCount", 1000, 1, "d", playerid);
    return 1;
}

forward ResetAirbreakCount(playerid);
public ResetAirbreakCount(playerid)
{
    if(!IsPlayerAirbreaking(playerid) && airbreaks[playerid] > 0) airbreaks[playerid]--;
}

Callback

There is only one callback included which is called when airbreak is detected.

//Example
new airbreaks[MAX_PLAYERS];

public OnPlayerAirbreak(playerid)
{
    airbreaks[playerid]++;
    if(airbreaks[playerid] > 5) Kick(playerid);
}

This callback is called when a player is either airbreaking on foot, or in a vehicle.

About

Detects airbreak and sends it to a callback. Originally created in October 2012, and updated throughout the years.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Pawn 100.0%