Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: Smol on January 15, 2022, 09:12:37 pm
Title: Custom Wallweapons
Post by: Smol on January 15, 2022, 09:12:37 pm
Hi
So here we go again.
i added custom wallweapons to Standoff and for some reason i doesnt show the text when you want to buy the weapon.
This is my line of code i added in zombiemode_weapons.gsc: Hope you can help me Probably gympie :derp:
-Smol
Title: Re: Custom Wallweapons
Post by: gympie6 on January 16, 2022, 07:12:06 pm
Hi there :)
You almost got it right, it's the & that's being used to get localized strings.
Examples of what does work without:
add_zombie_weapon( "zm_m1911", "Press & hold &&1 to buy M1911 [Cost: 100]", 100, "vox_crappy", 2 ); add_zombie_weapon( "zm_m1911_upgraded", "Press & hold &&1 to buy M1911 upgraded [Cost: 100]", 100, "vox_crappy", 2 ); add_zombie_weapon( "zm_m1911_upgraded_upgraded", "Press & hold &&1 to buy M1911 upgraded upgraded [Cost: 100]", 100, "vox_crappy", 2 ); add_zombie_weapon( "zm_python", "Press & hold &&1 to buy Python [Cost: 250]", 250, "vox_357", 5 ); add_zombie_weapon( "zm_python_upgraded", "Press & hold &&1 to buy Python upgraded [Cost: 250]", 250, "vox_357", 5 ); add_zombie_weapon( "zm_python_upgraded_upgraded", "Press & hold &&1 to buy Python upgraded [Cost: 250]", 250, "vox_357", 5 ); add_zombie_weapon( "zm_hk21", "Press & hold &&1 to buy HK21 [Cost: 1800]", 1800, "vox_mg", 5 ); add_zombie_weapon( "zm_hk21_upgraded", "Press & hold &&1 to buy HK21 upgraded [Cost: 1800]", 1800, "vox_mg", 5 ); add_zombie_weapon( "zm_hk21_upgraded_upgraded", "Press & hold &&1 to buy HK21 upgraded [Cost: 1800]", 1800, "vox_mg", 5 ); add_zombie_weapon( "zm_mp5", "Press & hold &&1 to buy MP5K [Cost: 1000]", 1000, "", 2 ); add_zombie_weapon( "zm_mp5_upgraded", "Press & hold &&1 to buy MP5K upgraded [Cost: 1000]", 1000, "", 2 ); add_zombie_weapon( "zm_mp5_upgraded_upgraded", "Press & hold &&1 to buy MP5K upgraded [Cost: 1000]", 1000, "", 2 );
This is how you use localized strings: add_zombie_weapon( "tesla_gun", &"ZOMBIE_BUY_TESLA", 10, "vox_tesla", 5 ); add_zombie_weapon( "tesla_gun_upgraded", &"ZOMBIE_BUY_TESLA", 10, "vox_tesla", 5 );
Title: Re: Custom Wallweapons
Post by: Smol on January 17, 2022, 03:12:17 pm
Ok nice thank you gympie got it ofc you it was you who answered, sadly the forum is kinda dead :./
Title: Re: Custom Wallweapons
Post by: gympie6 on January 17, 2022, 06:38:37 pm
I don't think that the forum is dead, there are currently not many scripters available.
Title: Re: Custom Wallweapons
Post by: Smol on January 18, 2022, 01:39:01 pm
Yeah you have a point there probably everyone went to Black ops 3 :/