04.07.2016, 00:59
Quote:
Alright. I don't sure I have understand everything.
You want make something which is checking if the money of a gift is available to give him to the player? If I'm totally wrong; can you, please, make a example ? |
Код:
CMD:getgift(playerid, params[]) { new rand = random(10); if(rand == 5 && boxVariables[1][boxMoney] == 1) { SendClientMessage(playerid, -1, "You have won $500,000!"); } else if(rand == 0 && boxVariables[1][boxVehicle] == 1) { SendClientMessage(playerid, -1, "You have won a car!"); } return 1; }
But let's say he gets the value 5, but boxMoney is 0, how could I make it so it will choose a different number and give him a different price.
Right now, if he rolls 5 and boxMoney is equal to 0, he won't get anything.