Aller au contenu principal

PlayerGangZoneGetPos

attention

La fonctionnalité de type fonction a été ajoutée dans la version omp v1.1.0.2612 et ne fonctionne pas avec les versions antérieures !

Description​

Get the position of a gangzone, represented by minX, minY, maxX, maxY coordinates.

NameDescription
playeridThe ID of the player to whom player gangzone is bound.
zoneidThe ID of the zone to the coordinates of which want to get.
&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​

This function always returns true.

Examples​

new gGangZoneID[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
// Create the gangzone
gGangZoneID[playerid] = CreatePlayerGangZone(playerid, 2236.1475, 2424.7266, 2319.1636, 2502.4348);

new
Float:minX,
Float:minY,
Float:maxX,
Float:maxY;

PlayerGangZoneGetPos(playerid, gGangZoneID[playerid], minX, minY, maxX, maxY);
return 1;
}