Skip to content

Commit 5a8a3e6

Browse files
authored
Adding Condition to identify airport pickup (#787)
* Adding Condition to identify airport pickup Solving #786 error from occuring. * Update LegacyProcessing.pwn * Update LegacyProcessing.pwn
1 parent 384123f commit 5a8a3e6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pawn/Entities/Pickups/LegacyProcessing.pwn

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,15 @@ LegacyOnPlayerPickUpPickup(playerid, pickupid)
142142

143143
// Airports:
144144
// Quite simple how it works. When a player picks up the pickup, simply show the menu!
145-
if(!g_PlayerMenu[playerid] && !IsPlayerInMinigame(playerid))
145+
if(!g_PlayerMenu[playerid] && !IsPlayerInMinigame(playerid))
146146
{
147-
if(Time->currentTime() - AirTime[playerid] < 60)
148-
{
149-
SendClientMessage(playerid,Color::Red,"There are no flights departing right now! Try again later.");
150-
return 1;
151-
}
147+
if (Time->currentTime() - AirTime[playerid] < 60) {
148+
if (pickupid == g_AirportPickup[0] || pickupid == g_AirportPickup[1] ||
149+
pickupid == g_AirportPickup[2] || pickupid == g_AirportPickup[3]) {
150+
SendClientMessage(playerid,Color::Red,"There are no flights departing right now! Try again later.");
151+
return 1;
152+
}
153+
}
152154
g_PlayerMenu[ playerid ] = 1;
153155

154156
if (pickupid == g_AirportPickup[0])

0 commit comments

Comments
 (0)