Step One:
Open \Core\Configuration.sqf:
Scroll down to: life_licenses and add you License shown as below.
life_licenses =[ ["license_cop_air","cop"], ["license_cop_swat","cop"], ["license_cop_cg","cop"], ["license_civ_driver","civ"], ["license_civ_air","civ"], ["license_civ_heroin","civ"], ["license_civ_marijuana","civ"], ["license_civ_gang","civ"], ["license_civ_boat","civ"], ["license_civ_oil","civ"], ["license_civ_dive","civ"], ["license_civ_truck","civ"], ["license_civ_gun","civ"], ["license_civ_rebel","civ"], ["license_civ_coke","civ"], ["license_civ_diamond","civ"], ["license_civ_copper","civ"], ["license_civ_iron","civ"], ["license_civ_sand","civ"], ["license_civ_salt","civ"], ["license_civ_cement","civ"], ["license_civ_home", "civ"], ["license_civ_EXAMPLE", "civ"] // <-- Add your License here!];
Step Two:
Open \Core\Config\fn_licenseType.sqf:
At Case 0: Add your license shown as below:
case 0: { switch (_type) do { case "driver": {_var = "license_civ_driver"}; //Drivers License cost case "boat": {_var = "license_civ_boat"}; //Boating license cost case "pilot": {_var = "license_civ_air"}; //Pilot/air license cost case "gun": {_var = "license_civ_gun"}; //Firearm/gun license cost case "dive": {_var = "license_civ_dive"}; //Diving license cost case "oil": {_var = "license_civ_oil"}; //Oil processing license cost case "cair": {_var = "license_cop_air"}; //Cop Pilot License cost case "swat": {_var = "license_cop_swat"}; //Swat License cost case "cg": {_var = "license_cop_cg"}; //Coast guard license cost case "heroin": {_var = "license_civ_heroin"}; //Heroin processing license cost case "marijuana": {_var = "license_civ_marijuana"}; //Marijuana processing license cost case "medmarijuana": {_var = "license_civ_medmarijuana"}; //Medical Marijuana processing license cost case "gang": {_var = "license_civ_gang"}; //Gang license cost case "rebel": {_var = "license_civ_rebel"}; //Rebel License case "truck":{_var = "license_civ_truck"}; //Truck License case "diamond": {_var = "license_civ_diamond"}; case "salt": {_var = "license_civ_salt"}; case "cocaine": {_var = "license_civ_coke"}; case "sand": {_var = "license_civ_sand"}; case "iron": {_var = "license_civ_iron"}; case "copper": {_var = "license_civ_copper"}; case "cement": {_var = "license_civ_cement"}; case "home": {_var = "license_civ_home"}; case "EXAMPLE": {_var = "license_civ_EXAMPLE"}; //Add your License Here <---- default {_var = ""}; };
Some goes for Case 1 but then the otherway around:
case "license_civ_EXAMPLE": {_var = "EXAMPLE"};
Make sure to put it above:
default {_var = ""};
Step Three:
Open \Core\Config\fn_licensePrice.sqf
Add your license in here aswell like:
case "EXAMPLE": {250000}; //where 250000 is the price offcourse
Step Four:
Open \Core\Config\fn_varToStr.sqf
Scroll down to the License Block and add your license here like:
//License Block case "license_civ_driver": {"Driver License"}; case "license_civ_air": {"Pilot License"}; case "license_civ_heroin": {"Heroin Training"}; case "license_civ_gang": {"Gang License"}; case "license_civ_oil": {"Oil Processing"}; case "license_civ_dive": {"Diving License"}; case "license_civ_boat": {"Boating License"}; case "license_civ_gun": {"Firearm License"}; case "license_cop_air": {"Pilot License"}; case "license_cop_swat": {"Swat License"}; case "license_cop_cg": {"Coast Guard"}; case "license_civ_rebel": {"Rebel Training"}; case "license_civ_truck": {"Truck License"}; case "license_civ_diamond": {"Diamond Processing"}; case "license_civ_copper": {"Copper Processing"}; case "license_civ_iron": {"Iron Processing"}; case "license_civ_sand": {"Sand Processing"}; case "license_civ_salt": {"Salt Processing"}; case "license_civ_coke": {"Cocaine Training"}; case "license_civ_marijuana": {"Marijuana Training"}; case "license_civ_cement": {"Cement Mixing License"}; case "license_civ_EXAMPLE": {"EXAMPLE License"}; //Add your License Here.};
Now your done.. for the files that is ..
Step Five:
Open up your mission in Arma3 Editor.
Go create an NPC somewhere to where people can buy the license. Add this in the Init Line.
this addAction[format["%1 ($%2)",["license_civ_EXAMPLE"] call life_fnc_varToStr,[(["EXAMPLE"] call life_fnc_licensePrice)] call life_fnc_numberText],life_fnc_buyLicense,"EXAMPLE",0,false,false,"",' !license_civ_EXAMPLE && playerSide == civilian '];
Change ofcourse the EXAMPLE to your own license name.
Now you have a NPC which sell's the license.
Dont forget to add this tho:
this allowDamage false; this enableSimulation false;
Otherwise the NPC will just wonder off.. :rolleyes:
Good Job, You've Made It! :D
Alternative's you can do with this:
Make certain Clothing, Vehicle and Weapon Shops just for the people who have the license.
In every NPC you put down, Make sure it doesn't check for the Rebel license, But the license you've just created.
You also got to create separate files in certain folders to make something work.
If you guys show enough interest in this, I might make a tut on that aswell.