Skip to content

Commit

Permalink
Update UseGangZoneCheck.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adib-yg committed Jan 30, 2024
1 parent b317434 commit 53024b1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/scripting/functions/UseGangZoneCheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ tags: ["player", "gangzone"]

Enables the callback when a player enters/leaves this zone.

| Name | Description |
| ----------- | -------------------------------------------------- |
| zoneid | The ID of the zone to enable area detection for. |
| enable | Should entry detection be started or stopped? |
| Name | Description |
|-------------|--------------------------------------------------|
| zoneid | The ID of the zone to enable area detection for. |
| bool:enable | Should entry detection be started or stopped? |

## Returns

Expand All @@ -31,14 +31,14 @@ public OnGameModeInit()
gGangZoneID = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);

// Enabled the callback when a player enters/leaves this zone
UsePlayerGangZoneCheck(playerid, gGangZoneID, true);
UseGangZoneCheck(gGangZoneID, true);
}

public OnPlayerEnterGangZone(playerid, zoneid)
{
if(gGangZoneID == zoneid)
if (zoneid == gGangZoneID)
{
new string[128];
new string[64];
format(string, sizeof(string), "You are entering gangzone %i", zoneid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
}
Expand All @@ -47,9 +47,9 @@ public OnPlayerEnterGangZone(playerid, zoneid)

public OnPlayerLeaveGangZone(playerid, zoneid)
{
if(gGangZoneID == zoneid)
if (zoneid == gGangZoneID)
{
new string[128];
new string[64];
format(string, sizeof(string), "You are leaving gangzone %i", zoneid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
}
Expand Down

0 comments on commit 53024b1

Please sign in to comment.