Random num for weapon
wepname[3]
{ 1. weapon_usp, 2. weapon_m4a1, 3. weapon_ak47 } ham_give_weapon(id, random_num(0,primwep[] - 1) Would that give you a random weapon from that list? |
Re: Random num for weapon
random(sizeof(wepname))
Are those array values supposed to be strings or variables? |
Re: Random num for weapon
Quote:
There strings weapon names just have the 1. 2. 3. to number them for my own thing... those arnt ther ein the script. |
Re: Random num for weapon
Code:
|
Re: Random num for weapon
so i dont have to put any numbers up ther ein the [] []
amd od rather use ham. ham_give_weapon(id, gMyWeaponName[ random( sizeof gMyWeapon ) ) ] ); |
Re: Random num for weapon
Use the fun native, more efficient here.
Yes you don't need to provided a size. |
Re: Random num for weapon
When I use
PHP Code:
PHP Code:
|
Re: Random num for weapon
Quote:
Code:
|
| All times are GMT -4. The time now is 17:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.