warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
PlayerGangZoneDestroy
warning
This function was added in omp v1.1.0.2612 and will not work in earlier versions!
Description
Destroy player gangzone.
Name | Description |
---|---|
playerid | The ID of the player to whom the player gangzone will be destroyed. |
zoneid | The ID of the player gangzone for destroy. |
Returns
1: The function executed successfully.
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);
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
// Check for the existence of gangzone and if it exists, destroy it
if (IsValidPlayerGangZone(playerid, gGangZoneID[playerid]))
{
PlayerGangZoneDestroy(playerid, gGangZoneID[playerid]);
gGangZoneID[playerid] = INVALID_GANG_ZONE;
}
return 1;
}
Related Functions
- CreatePlayerGangZone: Create player gangzone.
- PlayerGangZoneShow: Show player gangzone in a color.
- PlayerGangZoneHide: Hide player gangzone.
- PlayerGangZoneFlash: Start player gangzone flash.
- PlayerGangZoneStopFlash: Stop 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.