04.07.2016, 01:43
So, you should change your function to:
PHP код:
CMD:test(playerid, params[])
{
new rand = random(10);
while(rand == 5 && boxVariables[1][boxMoney] != 0) rand = random(10);
// While rand is equal to 5 and box's money isn't equal to 0 - attribute to random a new value
while(rand == 2 && boxVariables[1][boxVehicle] != 0) rand = random(10);
return 1;
}