How can i limit an model?
#7

Quote:
Originally Posted by Abagail
Посмотреть сообщение
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.
This is a bit more logical than what I said, I'd go with it. What I made was simply a quick way to do it considering you posted no code.
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: 2 Guest(s)