27.04.2018, 09:16
Move the if statement inside the loop. That's awful way to write that code.
PHP код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
for (new i; i != MAX_DEALER; i++)
{
if (!DealershipData[i][dExists] && pickupid != DealershipData[i][dPickup]) continue;
ShowPlayerFooter(playerid, sprintf("~n~~b~~h~%s~n~~g~~h~Stock: ~y~%d~n~~g~~h~Status: %s~n~~g~~h~type /buycar to buy", DealershipData[i][dName], DealershipData[i][dStock], (DealershipData[i][dLock] == 1) ? ("~r~~h~Close") : ("~g~~h~Open")), 1000);
}
return 1;
}