I want to upgrade the police slots. Also, I want to create one more police license. How can I do that? If you tell me where to do it, I will try to do it. Also, I want to add levels to Police slots.
Police Slots And New License
-
- Altis Life
-
Frenzy -
3. April 2022 um 10:35 -
Erledigt
-
-
Hey. I will briefly translate you existing tutorials.
New license
Open your Config_Licenses.hpp in your config folder.
In this file you can add a new config entry:
Codeclass tutorial { // Classname variable = "tutorial"; // Var Name displayName = "STR_License_Tutorial"; Stringname price = 1500; // Price illegal = true; // Illegal true/false side = "civ"; // for which side? civ / cop / med };
In your stringtable.xml you add another entry as well (in this case STR_License_Tutorial)
(original thread: Einsteiger Tutorial: Neue Lizenzen einfügen Ab 4.4 + Spawnpunkt + Shops)
More cop levels
Go in your database and edit your coplevel (following the existing pattern).
And thats all. Maybe add the new levels to your id card system or comparable.
(original thread: [Tutorial] Mehr Polizeiränge)
If you also mean add more slots to join:
Just place down more units on your spawn island and group them with the main blufor unit. -
Hey. I will briefly translate you existing tutorials.
New license
Open your Config_Licenses.hpp in your config folder.
In this file you can add a new config entry:
Codeclass tutorial { // Classname variable = "tutorial"; // Var Name displayName = "STR_License_Tutorial"; Stringname price = 1500; // Price illegal = true; // Illegal true/false side = "civ"; // for which side? civ / cop / med };
In your stringtable.xml you add another entry as well (in this case STR_License_Tutorial)
(original thread: Einsteiger Tutorial: Neue Lizenzen einfügen Ab 4.4 + Spawnpunkt + Shops)
More cop levels
Go in your database and edit your coplevel (following the existing pattern).
And thats all. Maybe add the new levels to your id card system or comparable.
(original thread: [Tutorial] Mehr Polizeiränge)
If you also mean add more slots to join:
Just place down more units on your spawn island and group them with the main blufor unit.Thank you,
Also, I also want to create a database. Police level system is available, But I want to add a new one. E.g; Special operations level system? -
Creating a really new level is quite hard. You first have to add this level in your database like a copy from the coplevel.
Next you have to add this level to your data request on server side and client side (mission).
Try search for coplevel in your project to get an idea how to implement a new level.
-
Creating a really new level is quite hard. You first have to add this level in your database like a copy from the coplevel.
Next you have to add this level to your data request on server side and client side (mission).
Try search for coplevel in your project to get an idea how to implement a new level.
Problem solved, thanks.
May I ask one more thing? I want to adjust the police slots by level. E.g; cop_1 = coplevel 5
Codeif(!(str(player) in ["cop_1"])) then { if((FETCH_CONST(life_coplevel) < 8) && (FETCH_CONST(life_adminlevel) < 5)) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; };
I'm trying to set it this way, but it's not working.
-
in your case you check if your player is not using slot cop_1. If this is true you check if the player has an admin level = 5 OR a cop level >= 8, when true -> allow play
Did you check whether you have an adminlevel equal to 5?
Pls send your RPT Log
-
in your case you check if your player is not using slot cop_1. If this is true you check if the player has an admin level = 5 OR a cop level >= 8, when true -> allow play
Did you check whether you have an adminlevel equal to 5?
Pls send your RPT Log
Yes, I wanted to give administrators a level they can enter, I know that. But the problem is, for example; I assign a level to the cop_1 slot and it can be entered without leveling. am i doing something wrong?
-
-
-
-
It doesn't work even if I level it. Where else can I go wrong?
-
pls send your complete file
-
Code
Alles anzeigen#include "..\script_macros.hpp" /* File: fn_initCop.sqf Author: Bryan "Tonic" Boardwine Description: Cop Initialization file. */ player addRating 9999999; waitUntil {!(isNull (findDisplay 46))}; if((str(player) in ["cop_1"])) then { if((FETCH_CONST(life_coplevel) < 8) && (FETCH_CONST(life_adminlevel) < 5)) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; player setVariable ["admin_level",(FETCH_CONST(life_adminlevel)),true]; player setVariable ["rank",(FETCH_CONST(life_coplevel)),true]; switch (FETCH_CONST(life_coplevel)) do { case 2: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_2"); }; case 3: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_3"); }; case 4: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_4"); }; case 5: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_5"); }; case 6: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_6"); }; case 7: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_7"); }; case 8: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_8"); }; case 9: { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_9"); }; default { life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop_default"); }; }; life_paycheck = life_paycheck; // life_paycheck = life_paycheck + LIFE_SETTINGS(getNumber,"ALRPG_paycheck_etkinlik"); // if (call life_adminlevel != 0) then { player_Twitteradminpwr = true;";}; [] call life_fnc_spawnMenu; waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done. [] spawn life_fnc_welcome; [] spawn life_fnc_welcome_info; [] spawn life_fnc_placeablesInit;
-
-
Code
if (str(player) in (LIFE_SETTINGS(getArray,"slots_justiz"))) then { if (FETCH_CONST(life_justizlevel) isEqualTo 0) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; };
This is a part of my old altis life script, it is nearly the same.
Maybe add debug messages like systemChat "DEBUG 1"...
Also check the result of systemChat (str player)
I don't think it works like this. What you're doing is checking if player's name is in the array (here: "cop_1").
It has nothing to do with the lobby player slot.
You can check this by changing your Arma 3 Profile Name to "cop_1".str player gives you the unit name (from the init) back.
-
You‘re right, I totally forgot that
-
Code
if (str(player) in (LIFE_SETTINGS(getArray,"slots_justiz"))) then { if (FETCH_CONST(life_justizlevel) isEqualTo 0) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; };
This is a part of my old altis life script, it is nearly the same.
Maybe add debug messages like systemChat "DEBUG 1"...
Also check the result of systemChat (str player)
str player gives you the unit name (from the init) back.
Sorry, it didn't. It was working before, I set it up. But now it doesn't. Is there a script difference? Or am I using an old script, how do I find out?
-
Sorry, it didn't. It was working before, I set it up. But now it doesn't. Is there a script difference? Or am I using an old script, how do I find out?
you can't just copy and paste my snippet. It is working for a level called "justizlevel", it also requires slots_justiz in your main config.
Try add debug messages between the lines and take a look on your chat messages