note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
PlayerGangZoneStopFlash
warning
This function was added in omp v1.1.0.2612 and will not work in earlier versions!
Description
Stop player gangzone flash.
Name | Description |
---|---|
playerid | The ID of the player to whom player gangzone is bound. |
zoneid | The ID of the player gangzone for in stop flashing. |
Returns
1: The function executed successfully. Success is reported even if the player gangzone wasn't flashing to begin with.
0: The function failed to execute. The gangzone specified does not exist.
Examples
// This variable is used to store the id of the gangzone
// so that we can use it throught the script
new gGangZoneID[MAX_PLAYERS] = {INVALID_GANG_ZONE, ...};
public OnPlayerConnect(playerid)
{
// Create the gangzone
gGangZoneID[playerid] = CreatePlayerGangZone(playerid, 2236.1475, 2424.7266, 2319.1636, 2502.4348);
// Show the gangzone player
PlayerGangZoneShow(playerid, gGangZoneID[playerid]);
// Start player gangzone flash
PlayerGangZoneFlash(playerid, gGangZoneID[playerid], 0xFF00FFFF);
}
public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
// Check if gangzone exists and also check if it flashing
// If true, then stop flashing gangzone
if (IsValidPlayerGangZone(playerid, gGangZoneID[playerid]) && IsPlayerGangZoneFlashing(playerid, gGangZoneID[playerid]))
{
PlayerGangZoneStopFlash(playerid, gGangZoneID[playerid]);
}
}
Related Functions
- CreatePlayerGangZone: Create player gangzone.
- PlayerGangZoneDestroy: Destroy player gangzone.
- PlayerGangZoneShow: Show player gangzone.
- PlayerGangZoneHide: Hide player gangzone.
- PlayerGangZoneFlash: Start player gangzone flash.
- PlayerGangZoneGetColour: Get the colour of a player gangzone.
- PlayerGangZoneGetFlashColour: Get the flashing colour of a player gangzone.
- PlayerGangZoneGetPos: Get the position of a gangzone, represented by minX, minY, maxX, maxY coordinates.
- IsValidPlayerGangZone: Check if the player gangzone valid.
- IsPlayerInPlayerGangZone: Check if the player in player gangzone.
- IsPlayerGangZoneVisible: Check if the player gangzone is visible.
- IsPlayerGangZoneFlashing: Check if the player gangzone is flashing.
- UsePlayerGangZoneCheck: Enables the callback when a player enters/leaves this zone.