Chuyển tới nội dung chính

CreatePlayerGangZone

cảnh báo

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Create player gangzone. This can be used as a way around the global gangzone limit.

NameDescription
playeridThe ID of the player to whom the player gangzone will be created.
Float:minXThe X coordinate for the west side of the player gangzone.
Float:minYThe Y coordinate for the south side of the player gangzone.
Float:maxXThe X coordinate for the east side of the player gangzone.
Float:maxYThe Y coordinate for the north side of the player gangzone.

Returns

The ID of the created player gangzone, returns -1 if not created

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];

public OnPlayerConnect(playerid)
{
// Create the gangzone
gGangZoneID[playerid] = CreatePlayerGangZone(playerid, 2236.1475, 2424.7266, 2319.1636, 2502.4348);
}
                          MaxY
v
-------------* < MaxX
| |
| gangzone |
| center |
| |
MinX > *-------------
^
MinY

Notes

cảnh báo
  • There is a limit of 1024 gangzones.
  • Putting the parameters in the wrong order results in glitchy behavior.
mẹo

This function merely CREATES the gangzone, you must use PlayerGangZoneShow to show it.

GangZone Editors