Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Random...  (Read 696 times)

0 Members and 1 Guest are viewing this topic.

Crook

  • Guest
Random...
« on: 02 Feb 2004, 06:25:30 »
Is there a way to make a script randomly pick items, like time of day, weather, or even what gun you start out with in a mission... Hopefully this is possible in 1.46...

j-man

  • Guest
Re:Random...
« Reply #1 on: 02 Feb 2004, 07:45:09 »
Just use the random command.

So for a random weapon, just create a script like this:

Code: [Select]
_number = (random 0.5)

removeallweapons player

?(_number == 0.1) : goto "addm16"
?(_number == 0.2) : goto "addak47"
?(_number == 0.3) : goto "addhk"
?(_number == 0.4) : goto "addbizon"
?(_number == 0.5) : goto "addmachinegun"

#addm16
player addweapon "m16"
player addmagazine "m16"

etc...



I havn't tested the script out, but it should work ;)