Closed Kasper9683 closed 4 years ago
This should work:
/*
Author - HoverGuy
© All Fucks Reserved
Website - http://www.sunrise-production.com
Defines available vehicle shops
class YourShopClass - Used as a param for the call, basically the shop you want to display
{
conditionToAccess - STRING - Condition that must return either true or false, if true the player will have access to the shop
class YourShopCategory - Shop category, can be whatever you want
{
displayName - STRING - Category display name
vehicles - ARRAY OF ARRAYS - Shop content
|- 0 - STRING - Classname
|- 1 - INTEGER - Price
|- 2 - STRING - Condition that must return either true or false, if true the vehicle appears in the list else no
spawnPoints - ARRAY OF ARRAYS - Spawn positions (markers/positions)
|- 0 - STRING - Display name in the dialog
|- 1 - ARRAY OF MIXED - Markers/positions
};
};
*/
class HG_DefaultShop // HG_DefaultShop is just a placeholder for testing purposes, you can delete it completely and make your own
{
conditionToAccess = "true"; // Example: "(playerSide in [west,independent]) AND ((rank player) isEqualTo 'COLONEL')"
class CivilianGround
{
displayName = "$STR_HG_SHOP_CIVILIAN_GROUND";
vehicles[] =
{
{"C_Quadbike_01_F",1000,"true"},
{"C_Offroad_01_F",5000,"true"},
{"C_SUV_01_F",5000,"true"},
{"C_Van_01_transport_F",6500,"true"},
{"RHS_Ural_Civ_01",7500,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_1",{"civilian_vehicles_spawn_1"}}
};
};
class CivilianHelicopters
{
displayName = "$STR_HG_SHOP_CIVILIAN_HELICOPTERS";
vehicles[] =
{
{"C_Heli_Light_01_civil_F",10000,"true"},
{"rhs_uh1h_idap",12000,"true"},
{"RHS_Mi8t_civilian",15000,"true"},
{"RHS_Mi8amt_civilian",17000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_1",{"civilian_vehicles_spawn_2"}}
};
};
class CivilianPlanes
{
displayName = "$STR_HG_SHOP_CIVILIAN_PLANES";
vehicles[] =
{
{"RHS_AN2",20000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_1",{"civilian_vehicles_spawn_3"}}
};
};
class MilitaryGround
{
displayName = "$STR_HG_SHOP_MILITARY_GROUND";
vehicles[] =
{
{"rhsgref_cdf_b_reg_uaz_open",4000,"true"},
{"rhsgref_cdf_b_reg_uaz",5000,"true"},
{"rhsgref_cdf_b_gaz66",6000,"true"},
{"rhsusf_m1025_w",7500,"true"},
{"rhsgref_cdf_b_reg_uaz_spg9",8000,"true"},
{"rhsgref_cdf_b_reg_uaz_dshkm",8000,"true"},
{"B_G_Offroad_01_AT_F",9000,"true"},
{"B_G_Offroad_01_armed_F",9000,"true"},
{"rhsusf_m1043_w_m2",10000,"true"},
{"rhsgref_BRDM2_HQ_b",12000,"true"},
{"rhsusf_M1078A1P2_B_M2_WD_fmtv_usarmy",12500,"true"},
{"rhsusf_m1240a1_m2crows_usarmy_wd",14000,"true"},
{"rhsusf_M1220_M153_M2_usarmy_wd",15000,"true"},
{"rhsusf_M1117_W",16000,"true"},
{"rhsusf_m113_usarmy",16000,"true"},
{"rhsusf_stryker_m1126_m2_wd",17000,"true"},
{"rhsgref_cdf_b_bmd2k",17500,"true"},
{"rhsgref_cdf_b_bmp2",18000,"true"},
{"B_APC_Wheeled_01_cannon_F",20000,"true"},
{"RHS_M6_wd",22000,"true"},
{"RHS_M2A2_BUSKI_WD",25000,"true"},
{"rhsgref_cdf_b_t72ba_tv",30000,"true"},
{"RHS_M2A3_BUSKIII_wd",35000,"true"},
{"rhsgref_cdf_b_t72bb_tv",40000,"true"},
{"rhsusf_m1a1aimwd_usarmy",45000,"true"},
{"rhsgref_cdf_b_180bv_tv",47500,"true"},
{"rhsusf_m1a1aim_tuski_wd",50000,"true"},
{"B_MBT_01_TUSK_F",55000,"true"},
{"rhsusf_m1a2sep1tuskiiwd_usarmy",65000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_2",{"military_vehicles_spawn_1"}}
};
};
class MilitaryHelicopters
{
displayName = "$STR_HG_SHOP_MILITARY_HELICOPTERS";
vehicles[] =
{
{"RHS_MELB_H6M",12000,"true"},
{"RHS_MELB_MH6M",15000,"true"},
{"RHS_MELB_AH6M",17000,"true"},
{"rhs_uh1h_hidf_gunship",20000,"true"},
{"RHS_UH1Y",22500,"true"},
{"RHS_UH60M",25000,"true"},
{"rhsusf_CH53E_USMC_GAU21",30000,"true"},
{"RHS_CH_47F",32500,"true"},
{"B_Heli_Transport_01_F",35000,"true"},
{"rhsgref_cdf_b_reg_Mi17Sh",40000,"true"},
{"RHS_AH1Z_wd",42500,"true"},
{"rhsgref_cdf_b_Mi35",45000,"true"},
{"rhsgref_b_mi24g_CAS",50000,"true"},
{"RHS_AH64D",55000,"true"},
{"RHS_AH64DGrey",60000,"true"},
{"B_Heli_Attack_01_dynmaicLoadout_F",65000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_2",{"military_vehicles_spawn_2"}}
};
};
class MilitaryPlanes
{
displayName = "$STR_HG_SHOP_MILITARY_PLANES";
vehicles[] =
{
{"B_UAV_02_dynamicLoadout_F",15000,"true"},
{"USAF_MQ9",20000,"true"},
{"rhs_l159_cdf_b_CDF",22500,"true"},
{"rhsgref_cdf_b_su25",25000,"true"},
{"USAF_C130J",27500,"true"},
{"USAF_C17",30000,"true"},
{"USAF_A10",32500,"true"},
{"rhsgref_cdf_b_mig29s",35000,"true"},
{"USAF_F35A",45000,"true"},
{"USAF_F35A_STEALTH",45000,"true"},
{"USAF_AC130U",50000,"true"},
{"USAF_F22_EWP_AG",65000,"true"},
{"USAF_F22_EWP_AA",65000,"true"}
};
spawnPoints[] =
{
{"$STR_HG_MARKER_2",{"military_vehicles_spawn_3"}}
};
};
};
Thankyou so much! Fixed.
Hi again, so sorry to be a nuisance! Upon loading my mission i receive this error : line:1 HG/Config/HG_VehiclesShopCfg/:'c' encountered instead of '{'
Trying to troubleshoot myself and adding a '{' before " class HG_DefaultShop " changes the error to line:0 HG/Config/HG_VehiclesShopCfg/:'{' encountered instead of '='
I really don't want to screw up anything anymore so i thought to ask a professional. Here is the HG_VehiclesShop cfg.
`/* Author - HoverGuy © All Fucks Reserved Website - http://www.sunrise-production.com
*/ class HG_DefaultShop // HG_DefaultShop is just a placeholder for testing purposes, you can delete it completely and make your own conditionToAccess = "true"; // Example: "(playerSide in [west,independent]) AND ((rank player) isEqualTo 'COLONEL')"
}; `