Sign in to follow this  
leiizko

Reworked hardpoint shop

Recommended Posts

Hello,

To anyone interested, I have finished reworking the hardpoint shop today. Prices are now dvar controlled so you can set the prices to whatever you like ( the upper limit is 9999 - equivalent of disabling the hardpoint ). The list in shop will automatically order itself in ascending order so don't be alarmed if you see list reordering itself as you change the prices.

set radar_shop "20"
set airstrike_shop "70"
set artillery_shop "70"
set agm_shop "100"
set asf_shop "100"
set helicopter_shop "180"
set predator_shop "280"
set ac130_shop "380"
set mannedheli_shop "500"
set nuke_shop "600"

 

Another new thing is you can now easily include new hardpoints to it (killstreak based hardpoints are pain to do as before). All you need is hardpoint script(duuh) and then in hardpoint script in makeShopArray() add following things:

dvarNames - dvar name controling the price of the hardpoint. ( It will auto add "_shop" to it so plan you variable name accordingly - just check how default ones are done in dvar script). Names are separated by ;.

dvarNames = "radar;airstrike;artillery;helicopter;agm;predator;asf;ac130;mannedheli;nuke";

names - The name that will show in shop and hardpoint notify, again separated by ;.

names = "Radar;Airstrike;Artillery;Helicopter;Hellfire Missile;Predator Drone;Fighter Support;AC130 Gunship;Manned Helicopter;Thermonuclear Bomb";

callbacks - Array of hardpoint callbacks. This function gets called when you buy a hardpoint in shop. It must be entry point for your hardpoint.

callbacks[ callbacks.size ] = code\nuke::init;

extras - Any additional parameter needed with the function callback. Be carefull about array index - leave undefined if no additional parameters are required!

extras[ 3 ] = "helicopter_mp";

 

Just be carefull about the array indexes and you are done. Hardpoint is now included in shop.

Edited by leiizko
  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, leiizko said:

Hello,

To anyone interested, I have finished reworking the hardpoint shop today.

Dude, many thanks for your work.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this