How create command for random stuffs
#5

Quote:
Originally Posted by azzerking
Посмотреть сообщение
X445 I think you mis-read what he wanted.

He wants to be able to type a command /test, and it will randomly give him different stuff.

here is an example.

Код:
CMD:test( playerid, params[] )
{
	new rand = Random( 11 );

	switch( rand )
	{
		case 0 .. 2: // if rand is between 0 and 2 then run the code here
		{
			// Give Money Here
		}

		case 3 .. 5: // if rand is between 3 and 5 then run the code here
		{
			// Give Weapons Here
		}

		case 6 .. 8: // if rand is between 6 and 8 then run the code here
		{
			// Give Health or Armour
		}

		case 9 .. 11: // if rand is between 9 and 11 then run the code here
		{
			// Change Skin
		}

	}

	return 1;
}
I hope this is what you wanted, feel free to reply if you are still having issues.
Yup bro thats what i need. Thanks (y)
Reply


Messages In This Thread
How create command for random stuffs - by henkas - 09.10.2016, 15:58
Re: How create command for random stuffs - by BiosMarcel - 09.10.2016, 16:04
Re: How create command for random stuffs - by X445 - 09.10.2016, 16:12
Re: How create command for random stuffs - by azzerking - 09.10.2016, 16:19
Re: How create command for random stuffs - by henkas - 09.10.2016, 16:41
Re: How create command for random stuffs - by henkas - 09.10.2016, 17:20
Re: How create command for random stuffs - by Konstantinos - 09.10.2016, 17:23
Re: How create command for random stuffs - by azzerking - 09.10.2016, 17:25
Re: How create command for random stuffs - by henkas - 09.10.2016, 17:38

Forum Jump:


Users browsing this thread: 1 Guest(s)