2021-05-03, 06:37 AM
When you create Burrito vehicles add flag for burito vehicle and store burito id if you need
Then you dont need loop
Code:
for(new i; i < sizeof(Burrito_ID); i)
{
some_vehicle_global_var[Burrito_ID[i]]][isBurito] = true;
some_vehicle_global_var[Burrito_ID[i]]][BuritoID] = i;
}
Then you dont need loop
Code:
public OnPlayerExitVehicle(playerid, vehicleid)
{
InCar[playerid] = 0;
LastCar[playerid] = vehicleid;
if(DeliveryMan[playerid])
{
if(some_vehicle_global_var[vehicleid][isBurito]){
SendClientMessage(playerid, COLOR_COURIER, "* Press Y behind your vehicle to pickup the goods.");
}
}
return 1;
}