Random question
#1

Hi all, i'm going to do a menu. In this menu there are 3 item.

Item1
Item2
Item3

When i select first item, i would like to do 1 of these things:

Give +200$
Give -300$
Spawn a car near player and give +100$

Код:
	if(menuid == menu6)
	{
	  switch(row)
	  {
	    case 0..2:
	    {
	      RandomChoice(playerid);
			}
		}
	}
Код:
forward RandomChoice(playerid);
public RandomChoice(playerid)
{
    // Here the random 
	TogglePlayerControllable(playerid,true);
	HideMenuForPlayer(GetPlayerMenu(playerid),playerid);
}
I've tried to do this script with myself but it doesn't work :S

Can anyone please help me? Thx

So, sorry for my bad english :S
Reply
#2

Learn how to attach variables with random(); and htan how to use it with if(variable == 1...) do that else.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)