ah, ok. i missed the price-variable there. However, you still need to change that sethintstring and dont mess with the other lines.
Besides that you need to look for the PaP funtion ( stock-scripts it's in zombiemode_perks but for Harry i wouldn't know ), and the when the player pap's a weapon check it that weapon is allready upgraded or not. If it is the price is 10000, and if it's not the price is 5000.
If you want the hintstring to say either "Upgrade weapon. Cost [5000]." when a player holds a normal weapon, or "Double Upgrade weapon. Cost [10000]." when a player hold an upgraded weapon it's not impossible but it's going to require quite a lot of code for just a hintstring. You could simply do "Upgrade weapon: Cost [5000]. Double Upgrade: Cost [10000]." and then asjust the cost by checking if the weapon is allready upgraded or not like i mentioned above.
ah, ok. i missed the price-variable there. However, you still need to change that sethintstring and dont mess with the other lines.
Besides that you need to look for the PaP funtion ( stock-scripts it's in zombiemode_perks but for Harry i wouldn't know ), and the when the player pap's a weapon check it that weapon is allready upgraded or not. If it is the price is 10000, and if it's not the price is 5000.
If you want the hintstring to say either "Upgrade weapon. Cost [5000]." when a player holds a normal weapon, or "Double Upgrade weapon. Cost [10000]." when a player hold an upgraded weapon it's not impossible but it's going to require quite a lot of code for just a hintstring. You could simply do "Upgrade weapon: Cost [5000]. Double Upgrade: Cost [10000]." and then asjust the cost by checking if the weapon is allready upgraded or not like i mentioned above.
It took a while but i finally got it working with the hintstring, so thank you so much bluntstuffy for answering all my questions, this is what i did, so please correct me if i did something wrong that would otherwise mess up things later.
Code Snippet
Plaintext
harrybo21_perks_upgraded_trigger_watcher( machine ) { machine endon( "machine_removed" ); while( 1 ) { player = undefined; self waittill( "trigger", player );
if ( !machine.active || ( isDefined( player.is_drinking ) && player.is_drinking ) || player maps\_laststand::player_is_in_laststand() || player isThrowingGrenade() || player isSwitchingWeapons() ) { wait .1; continue; } cost = 5000; weapon = player getcurrentweapon();