How can i limit an model?
#6

You'd want to save and declare a variable for how many vehicle slots are CURRENTLY avaliable, NO LOOPING IS NEEDED if you just want to limit the dealership stock:

e.g:

pawn Код:
new gStock[MAX_VEHICLE_MODELS][MAX_VEHICLE_DEALERSHIPS];

// when they buy it
if(gStock[vehiclemodel][dealership] == 0) return SendClientMessage(playerid, -1, "That item is not in stock.");

gStock[vehiclemodel][dealership]--;
However, if you only want 10 infernuses on the whole server you can either keep a variable or query MySQL to see if there are 10 rows / data selections.
Reply


Messages In This Thread
How can i limit an model? - by PepsiCola23 - 20.05.2015, 08:58
Re: How can i limit an model? - by Threshold - 20.05.2015, 09:20
Re: How can i limit an model? - by PepsiCola23 - 20.05.2015, 10:55
Re: How can i limit an model? - by Banana_Ghost - 20.05.2015, 19:08
Re: How can i limit an model? - by PepsiCola23 - 20.05.2015, 19:26
Re: How can i limit an model? - by Abagail - 20.05.2015, 19:31
Re: How can i limit an model? - by Banana_Ghost - 20.05.2015, 22:15
Re: How can i limit an model? - by PepsiCola23 - 21.05.2015, 16:15
Re: How can i limit an model? - by sammp - 21.05.2015, 16:36
Re: How can i limit an model? - by PepsiCola23 - 21.05.2015, 16:45

Forum Jump:


Users browsing this thread: 3 Guest(s)