This goes to work?
#1

Hi, im doing a public for my gm of racing, of in every race the player goes to have 1/901 to get an object, this goes to work?

Код:
new RandStart = random(901);
  if(IsPlayerConnected(playerid))
  {
  		switch(RandStart)
    {
		  	case 0:
		  	{
		  	  AddItem(playerid,"Maximos_Embargos",1);
		  	  return 1;
		  	}
		  	case 1..900:
		  	{
		  	return 1;
		  	}
		}
	}
return 1
because when i compile if i put the random 900 or less don't give me a warning, and when i put more of 900 don't give me a warning.
Reply
#2

its not public :O
and the return :OOOOOOOO

it should be return 1; not return 1
so dont steal scripts...
Reply
#3

why aren't you just using if(RandStart) (same as ==1) and no returns? except for last one.
Reply
#4

Quote:
Originally Posted by RSX
why aren't you just using if(RandStart) (same as ==1) and no returns? except for last one.
Код:
ok, i go to use if(RandStart == 0)
{

}
if(RandStart == 1..900)
{

}
this its okey no?


---
And the return 1 i writed in here, but i have writed good the return 1; in my gm xD

SOLVED
public DarObjetos(playerid)
{
new RandStart = random(901);
if(IsPlayerConnected(playerid))
{
if(RandStart == 0)
{
AddItem(playerid,"Maximos_Embargos",1);
}
if(RandStart >= 1 && RandStart <= 900)
{

}
}
return 1;
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)