How should I do this?
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
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 ?
So let's say we have this command.

Код:
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;
}
As you can see, if the random value is 5 and boxMoney == 1, it will give him the money.
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.
Reply


Messages In This Thread
How should I do this? - by danielpalade - 04.07.2016, 00:26
Re: How should I do this? - by Dayrion - 04.07.2016, 00:51
Re: How should I do this? - by danielpalade - 04.07.2016, 00:59
Re: How should I do this? - by Dayrion - 04.07.2016, 01:10
Re: How should I do this? - by danielpalade - 04.07.2016, 01:22
Re: How should I do this? - by Dayrion - 04.07.2016, 01:24
Re: How should I do this? - by danielpalade - 04.07.2016, 01:29
Re: How should I do this? - by Dayrion - 04.07.2016, 01:35
Re: How should I do this? - by danielpalade - 04.07.2016, 01:37
Re: How should I do this? - by Dayrion - 04.07.2016, 01:43

Forum Jump:


Users browsing this thread: 2 Guest(s)