Jump to content
Sign in to follow this  
Shakir Darwish

[Tutorial] Add license

Recommended Posts

Difficulty: Easy

Author:  HugoMiller3625

Translate and adjuste by: Shakir Darwish

Source: Altis Dev.com: Link

-----------------------------------------------------

 

Step one:

open \ Core \ Configuration.sqf :

Find : life_licenses and add your license like this:

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_med_air”,“med”],
[“license_civ_home”,“civ”],
[“license_civ_here”,“civ”] // Change the license name !
];

Step two:

Open \ Core \ Config \ fn_licenseType.sqf :

At Case 0 : Add your license like this:

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 “mair”: {_var = “license_med_air”};
case “home”: {_var = “license_civ_home”};
case “ici”: {_var = “license_civ_here”}; // Add your license here
default {_var = “”};
};
};

Be sure to put your license before : Default {_var = “”};

Step three:

Open \ Core \ Config \ fn_licensePrice.sqf

add your license here:

case “EXAMPLE”: {250000}; //  25000 est le prix de votre licencecase “EXAMPLE”: {250000}; //  25000 is the price of your license

Step four:

Open \ Core \ Config \ fn_varToStr.sqf

Find //license block:

//License Block
case “license_civ_driver”: {(localize “STR_License_Driver”)};
case “license_civ_air”: {(localize “STR_License_Pilot”)};
case “license_civ_heroin”: {(localize “STR_License_Heroin”)};
case “license_civ_oil”: {(localize “STR_License_Oil”)};
case “license_civ_dive”: {(localize “STR_License_Diving”)};
case “license_civ_boat”: {(localize “STR_License_Boat”)};
case “license_civ_gun”: {(localize “STR_License_Firearm”)};
case “license_cop_air”: {(localize “STR_License_Pilot”)};
case “license_cop_swat”: {(localize “STR_License_Swat”)};
case “license_cop_cg”: {(localize “STR_License_CG”)};
case “license_civ_rebel”: {(localize “STR_License_Rebel”)};
case “license_civ_truck”: {(localize “STR_License_Truck”)};
case “license_civ_diamond”: {(localize “STR_License_Diamond”)};
case “license_civ_copper”: {(localize “STR_License_Copper”)};
case “license_civ_iron”: {(localize “STR_License_Iron”)};
case “license_civ_sand”: {(localize “STR_License_Sand”)};
case “license_civ_salt”: {(localize “STR_License_Salt”)};
case “license_civ_coke”: {(localize “STR_License_Cocaine”)};
case “license_civ_marijuana”: {(localize “STR_License_Marijuana”)};
case “license_civ_cement”: {(localize “STR_License_Cement”)};
case “license_med_air”: {(localize “STR_License_Pilot”)};
case “license_civ_home”: {(localize “STR_License_Home”)};
case “license_civ_ici”: {(localize “STR_License_here”)}; // add your license here
};

Fifth step

Open your mission.sql in Arma3 Editor.

Create or edit a NPC where people can buy a license . Add this in the Init Line:

this addAction[format["%1 ($%2)",[“license_civ_here”] call life_fnc_varToStr,[([“here”] call life_fnc_licensePrice)] call life_fnc_numberText],life_fnc_buyLicense,“here”,0,false,false,"",’ !license_civ_here && playerSide == civilian '];

change the license name by the name you want

Don't forgot to add this line in the NPC init line:

this allowDamage false; this enableSimulation false;

Thanks for reading.

 

Share this post


Link to post
Share on other sites
On 18.9.2016 at 6:52 AM, Shakir Darwish said:

Difficulty: Easy

Author:  HugoMiller3625

Translate and adjuste by: Shakir Darwish

Source: Altis Dev.com: Link

-----------------------------------------------------

 

Step one:

open \ Core \ Configuration.sqf :

Find : life_licenses and add your license like this:

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_med_air”,“med”],
[“license_civ_home”,“civ”],
[“license_civ_here”,“civ”] // Change the license name !
];

Step two:

Open \ Core \ Config \ fn_licenseType.sqf :

At Case 0 : Add your license like this:

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 “mair”: {_var = “license_med_air”};
case “home”: {_var = “license_civ_home”};
case “ici”: {_var = “license_civ_here”}; // Add your license here
default {_var = “”};
};
};

Be sure to put your license before : Default {_var = “”};

Step three:

Open \ Core \ Config \ fn_licensePrice.sqf

add your license here:

case “EXAMPLE”: {250000}; //  25000 est le prix de votre licencecase “EXAMPLE”: {250000}; //  25000 is the price of your license

Step four:

Open \ Core \ Config \ fn_varToStr.sqf

Find //license block:

//License Block
case “license_civ_driver”: {(localize “STR_License_Driver”)};
case “license_civ_air”: {(localize “STR_License_Pilot”)};
case “license_civ_heroin”: {(localize “STR_License_Heroin”)};
case “license_civ_oil”: {(localize “STR_License_Oil”)};
case “license_civ_dive”: {(localize “STR_License_Diving”)};
case “license_civ_boat”: {(localize “STR_License_Boat”)};
case “license_civ_gun”: {(localize “STR_License_Firearm”)};
case “license_cop_air”: {(localize “STR_License_Pilot”)};
case “license_cop_swat”: {(localize “STR_License_Swat”)};
case “license_cop_cg”: {(localize “STR_License_CG”)};
case “license_civ_rebel”: {(localize “STR_License_Rebel”)};
case “license_civ_truck”: {(localize “STR_License_Truck”)};
case “license_civ_diamond”: {(localize “STR_License_Diamond”)};
case “license_civ_copper”: {(localize “STR_License_Copper”)};
case “license_civ_iron”: {(localize “STR_License_Iron”)};
case “license_civ_sand”: {(localize “STR_License_Sand”)};
case “license_civ_salt”: {(localize “STR_License_Salt”)};
case “license_civ_coke”: {(localize “STR_License_Cocaine”)};
case “license_civ_marijuana”: {(localize “STR_License_Marijuana”)};
case “license_civ_cement”: {(localize “STR_License_Cement”)};
case “license_med_air”: {(localize “STR_License_Pilot”)};
case “license_civ_home”: {(localize “STR_License_Home”)};
case “license_civ_ici”: {(localize “STR_License_here”)}; // add your license here
};

Fifth step

Open your mission.sql in Arma3 Editor.

Create or edit a NPC where people can buy a license . Add this in the Init Line:

this addAction[format["%1 ($%2)",[“license_civ_here”] call life_fnc_varToStr,[([“here”] call life_fnc_licensePrice)] call life_fnc_numberText],life_fnc_buyLicense,“here”,0,false,false,"",’ !license_civ_here && playerSide == civilian '];

change the license name by the name you want

Don't forgot to add this line in the NPC init line:

this allowDamage false; this enableSimulation false;

Thanks for reading.

 

configuration.sqf has changed in 4.4, this tutorial no longer works for this patch

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×