Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: daedra descent on March 25, 2014, 12:05:34 am
Title: Buyable Max Ammo(Single Only)
Post by: daedra descent on March 25, 2014, 12:05:34 am
Basic buyable max ammo script. Can only be used once. Has option function arguments to easily customize the trigger(Cost, wait time).
for (i = 0; i < players.size; i++) { player_weapons = self GetWeaponsListPrimaries();
for( x = 0; x < player_weapons.size; x++ ) { self GiveMaxAmmo( player_weapons[x] ); } } }
Example of a proper argument set:
Code Snippet
Plaintext
trig ammo_trig(10000, 30);
The input "10000" represents the cost(zombie_cost), while the 30 represents the time(in seconds) before the trigger will allow the players to buy it again. Neither function arguments take a variable unless it is declared a number.
Title: Re: Buyable Max Ammo(Single Only)
Post by: jjbradman on March 25, 2014, 12:41:10 am
lol you forgot to specify some things and the values inside the that runs
Code Snippet
Plaintext
trig ammo_trig();
like
Code Snippet
Plaintext
trig ammo_trig(10000, 10);
you should comment there that they only have to change those values to whatever they want and script will do the rest
Title: Re: Buyable Max Ammo(Single Only)
Post by: daedra descent on March 25, 2014, 01:21:21 am