Moin, ich wollte mal fragen wie ich
machen kann das man zb. ab Coplevel 5
in der SEK Base spawnen kann und ab Adminlevel in der Adminbase
MfG
Moin, ich wollte mal fragen wie ich
machen kann das man zb. ab Coplevel 5
in der SEK Base spawnen kann und ab Adminlevel in der Adminbase
MfG
ja das geht. Ich kann dir die lösung schreiben, sobald ich zuhause bin^^
Also, gehe in folgende Datei: Altis_Life.Altis\dialog\function\fn_spawnPointCfg.sqf
/*
File: fn_spawnPointCfg.sqf
Author: Bryan "Tonic" Boardwine
Infos from Native-Network.net by AustrianNoob
Description:
Master configuration for available spawn points depending on the units side.
Return:
[Spawn Marker,Spawn Name,Image Path]
INFO:
Spawn (Levelgebunden):
if(__GETC__(Name_des_Levels) > 0) then {
_return = _return + [
["marker_name","Name im Spawnmenü","Verzeichnis des Bildes"]
];
};
Spawn (Lizenzgebunden):
if(Lizenz_Name && playerSide == civilian) then {
_return = _return + [
["marker_name","Name im Spawnmenü","Verzeichnis des Bildes"]
];
};
Spawn (UIDgebunden):
if((getPlayerUID player) in ["PLAYERID1","PLAYERID2"])then {
_return = _return + [
["marker_name","Name im Spawnmenü","Verzeichnis des Bildes"]
];
};
*/
private["_side","_return"];
_side = [_this,0,civilian,[civilian]] call BIS_fnc_param;
//Spawn Marker, Spawn Name, PathToImage
switch (_side) do
{
case west:
{
_return = [
["cop_spawn_1","Kavala HQ","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["cop_spawn_2","Pyrgos HQ","\a3\ui_f\data\map\MapControl\fuelstation_ca.paa"],
["cop_spawn_3","Athira HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"],
["cop_spawn_4","Air HQ","\a3\ui_f\data\map\Markers\NATO\b_air.paa"],
["cop_spawn_5","HW Patrol","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"]
];
if(__GETC__(life_coplevel) > 4) then {
_return = _return + [
["sek_HQ","SEK-HQ","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["sek_1","SEK-Stützpunkt 1","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["sek_2","SEK-Stützpunkt 2","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
];
};
if(__GETC__(life_adminlevel) > 0) then {
_return = _return + [
["admin_base","Admin-Base","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
];
};
};
case civilian:
{
_return = [
["civ_spawn_1","Kavala","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_2","Pyrgos","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_3","Athira","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_4","Sofia","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
];
if(count life_houses > 0) then {
{
_pos = call compile format["%1",_x select 0];
_house = nearestBuilding _pos;
_houseName = getText(configFile >> "CfgVehicles" >> (typeOf _house) >> "displayName");
_return pushBack [format["house_%1",_house getVariable "uid"],_houseName,"\a3\ui_f\data\map\MapControl\lighthouse_ca.paa"];
} foreach life_houses;
};
if(__GETC__(life_adminlevel) > 0) then {
_return = _return + [
["admin_base","Admin-Base","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
];
};
};
case independent: {
_return = [
["medic_spawn_1","Kavala Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_2","Athira Regional","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_3","Pygros Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"]
];
};
if(__GETC__(life_adminlevel) > 0) then {
_return = _return + [
["admin_base","Admin-Base","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
];
};
};
_return;
Alles anzeigen
Ich hoffe da ist kein Fehler drinne
4.4 und __GETC__ ??
wird wohl nicht gehen
Benutz pushBack.
Aso tut mir leid, dann postet biite eine Lösung. Ich nutze nämlich immer noch die 3.1.4.8, dachte da hat sich nix verändert
Nehmen wir mal das Beispiel der Polizei. In deiner fn_spawnPointCfg.sqf im Ordner dialog\function findest du sowas hier:
case west:
{
_return = [
["cop_spawn_1","Kavala HQ","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["cop_spawn_2","Pyrgos HQ","\a3\ui_f\data\map\MapControl\fuelstation_ca.paa"],
["cop_spawn_3","Athira HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"],
["cop_spawn_4","Air HQ","\a3\ui_f\data\map\Markers\NATO\b_air.paa"],
["cop_spawn_5","HW Patrol","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"]
];
};
Sagen wir nun, der Spawnpunkt "DEA" soll nur mit einer bestimmten Lizenz und "SWAT" nur ab Coplevel 7 verfügbar sein, dann sieht das etwa so aus:
case west:
{
_return = [
["cop_spawn_1","Kavala HQ","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["cop_spawn_2","Pyrgos HQ","\a3\ui_f\data\map\MapControl\fuelstation_ca.paa"],
["cop_spawn_3","Athira HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"],
["cop_spawn_4","Air HQ","\a3\ui_f\data\map\Markers\NATO\b_air.paa"],
["cop_spawn_5","HW Patrol","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"]
if (license_cop_dea) then {
_return pushBack ["cop_spawn_dea","DEA","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"];
};
if ((call life_coplevel) > 6) then {
_return pushBack ["cop_spawn_swat","SWAT","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"];
};
];
};
Alles anzeigen
Weiterführende Links für mehr Informationen:
pushBack - BI Community Wiki: https://community.bistudio.com/wiki/pushBack
Danke dir blackfisch :)!
Danke hat geklappt
Hab versucht das für die Rebellen zu machen geht aber allerdings nicht
/*
File: fn_spawnPointCfg.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master configuration for available spawn points depending on the units side.
Return:
[Spawn Marker,Spawn Name,Image Path]
*/
private["_side","_return"];
_side = [_this,0,civilian,[civilian]] call BIS_fnc_param;
//Spawn Marker, Spawn Name, PathToImage
switch (_side) do
{
case west:
{
_return = [
["cop_spawn_1","Kavala HQ","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["cop_spawn_2","Pyrgos HQ","\a3\ui_f\data\map\MapControl\fuelstation_ca.paa"],
["cop_spawn_3","Athira HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"],
["cop_spawn_4","Air HQ","\a3\ui_f\data\map\Markers\NATO\b_air.paa"],
["cop_spawn_5","HW Patrol","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"]
];
};
case civilian:
{
_return = [
["civ_spawn_10","Georgetown","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_20","La Rochelle","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_30","Lijinhaven","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_40","Balavu","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
if (license_rebel) then {
_return pushBack ["rebel_hq","Rebellen HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"];
};
];
if(count life_houses > 0) then {
{
_pos = call compile format["%1",_x select 0];
_house = nearestBuilding _pos;
_houseName = getText(configFile >> "CfgVehicles" >> (typeOf _house) >> "displayName");
_return pushBack [format["house_%1",_house getVariable "uid"],_houseName,"\a3\ui_f\data\map\MapControl\lighthouse_ca.paa"];
} foreach life_houses;
};
};
case independent: {
_return = [
["medic_spawn_1","Kavala Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_2","Athira Regional","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_3","Pygros Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"]
];
};
};
_return;
Alles anzeigen
Mein Spawn Menü ist leer wenn.
if (license_rebel) then
Fehler gefunden: "License_rebel" gibt es nicht.
Lizenzen sind immer nach einem Schema aufgebaut:
"license_" + Playerside + Lizenzname
Korrekt wäre demnach
license_civ_rebel
Muss dich leider enttäuschen, klappt nicht
/*
File: fn_spawnPointCfg.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master configuration for available spawn points depending on the units side.
Return:
[Spawn Marker,Spawn Name,Image Path]
*/
private["_side","_return"];
_side = [_this,0,civilian,[civilian]] call BIS_fnc_param;
//Spawn Marker, Spawn Name, PathToImage
switch (_side) do
{
case west:
{
_return = [
["cop_spawn_1","Kavala HQ","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["cop_spawn_2","Pyrgos HQ","\a3\ui_f\data\map\MapControl\fuelstation_ca.paa"],
["cop_spawn_3","Athira HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"],
["cop_spawn_4","Air HQ","\a3\ui_f\data\map\Markers\NATO\b_air.paa"],
["cop_spawn_5","HW Patrol","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"]
];
};
case civilian:
{
_return = [
["civ_spawn_10","Georgetown","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_20","La Rochelle","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_30","Lijinhaven","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_40","Balavu","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
if (license_civ_rebel) then {
_return pushBack ["rebel_hq","Rebellen HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"];
};
];
if(count life_houses > 0) then {
{
_pos = call compile format["%1",_x select 0];
_house = nearestBuilding _pos;
_houseName = getText(configFile >> "CfgVehicles" >> (typeOf _house) >> "displayName");
_return pushBack [format["house_%1",_house getVariable "uid"],_houseName,"\a3\ui_f\data\map\MapControl\lighthouse_ca.paa"];
} foreach life_houses;
};
};
case independent: {
_return = [
["medic_spawn_1","Kavala Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_2","Athira Regional","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_3","Pygros Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"]
];
};
};
_return;
Alles anzeigen
Dann wäre mal ein RPT-Log hilfreich, Rätselraten veranstalte ich heute leider nicht.... Ist die Lizenz auch korrekt definiert in der Config_Licenses.hpp?
Stimmt da hätte ich selber drauf kommen müssen das der ziemlich hilfreich ist.
Das hier ist meine Config_Licenses.hpp
/*
* class:
* variable = Variable Name
* displayName = License Name
* price = License Price
* illegal = Illegal License
* side = side indicator
*/
class Licenses {
//Civilian Licenses
class driver {
variable = "driver";
displayName = "STR_License_Driver";
price = 500;
illegal = false;
side = "civ";
};
class boat {
variable = "boat";
displayName = "STR_License_Boat";
price = 1000;
illegal = false;
side = "civ";
};
class pilot {
variable = "pilot";
displayName = "STR_License_Pilot";
price = 25000;
illegal = false;
side = "civ";
};
class trucking {
variable = "trucking";
displayName = "STR_License_Truck";
price = 20000;
illegal = false;
side = "civ";
};
class gun {
variable = "gun";
displayName = "STR_License_Firearm";
price = 10000;
illegal = false;
side = "civ";
};
class dive {
variable = "dive";
displayName = "STR_License_Diving";
price = 2000;
illegal = false;
side = "civ";
};
class home {
variable = "home";
displayName = "STR_License_Home";
price = 75000;
illegal = false;
side = "civ";
};
//Processing Licenses
class oil {
variable = "oil";
displayName = "STR_License_Oil";
price = 10000;
illegal = false;
side = "civ";
};
class diamond {
variable = "diamond";
displayName = "STR_License_Diamond";
price = 35000;
illegal = false;
side = "civ";
};
class salt {
variable = "salt";
displayName = "STR_License_Salt";
price = 12000;
illegal = false;
side = "civ";
};
class sand {
variable = "sand";
displayName = "STR_License_Sand";
price = 14500;
illegal = false;
side = "civ";
};
class iron {
variable = "iron";
displayName = "STR_License_Iron";
price = 9500;
illegal = false;
side = "civ";
};
class copper {
variable = "copper";
displayName = "STR_License_Copper";
price = 8000;
illegal = false;
side = "civ";
};
class cement {
variable = "cement";
displayName = "STR_License_Cement";
price = 6500;
illegal = false;
side = "civ";
};
class medmarijuana {
variable = "medmarijuana";
displayName = "STR_License_Medmarijuana";
price = 15000;
illegal = false;
side = "civ";
};
class holz {
variable = "holz";
displayName = "STR_License_Holzverarbeitung";
price = 20000;
illegal = false;
side = "civ";
};
class reis {
variable = "reis";
displayName = "STR_License_Reiswaffelherstellung";
price = 20000;
illegal = false;
side = "civ";
};
//Illegal Licenses
class cocaine {
variable = "cocaine";
displayName = "STR_License_Cocaine";
price = 30000;
illegal = true;
side = "civ";
};
class heroin {
variable = "heroin";
displayName = "STR_License_Heroin";
price = 25000;
illegal = true;
side = "civ";
};
class marijuana {
variable = "marijuana";
displayName = "STR_License_Marijuana";
price = 19500;
illegal = true;
side = "civ";
};
class rebel {
variable = "rebel";
displayName = "STR_License_Rebel";
price = 75000;
illegal = true;
side = "civ";
};
//Cop Licenses
class cAir {
variable = "cAir";
displayName = "STR_License_Pilot";
price = 15000;
illegal = false;
side = "cop";
};
class cg {
variable = "cg";
displayName = "STR_License_CG";
price = 8000;
illegal = false;
side = "cop";
};
//Medic Licenses
class mAir {
variable = "mAir";
displayName = "STR_License_Pilot";
price = 15000;
illegal = false;
side = "med";
};
};
Alles anzeigen
Log ist im Anhang.
Du hast in Zeile 35 in deiner spawn einen Fehler und in der 3D Vehicle posten mal deine spawn
Du musst den Case civilian wie folgt ändern:
case civilian:
{
_return = [
["civ_spawn_10","Georgetown","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_20","La Rochelle","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_30","Lijinhaven","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_40","Balavu","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
];
if (license_civ_rebel) then {
_return pushBack ["rebel_hq","Rebellen HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"];
};
if(count life_houses > 0) then {
{
_pos = call compile format["%1",_x select 0];
_house = nearestBuilding _pos;
_houseName = getText(configFile >> "CfgVehicles" >> (typeOf _house) >> "displayName");
_return pushBack [format["house_%1",_house getVariable "uid"],_houseName,"\a3\ui_f\data\map\MapControl\lighthouse_ca.paa"];
} foreach life_houses;
};
};
Alles anzeigen
Du hattest folgendest in dem _return = [] drin
if (license_civ_rebel) then {
return pushBack ["rebel_hq","Rebellen HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"];
};
Die ganze Datei sieht dann so aus:
/*
File: fn_spawnPointCfg.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master configuration for available spawn points depending on the units side.
Return:
[Spawn Marker,Spawn Name,Image Path]
*/
private["_side","_return"];
_side = [_this,0,civilian,[civilian]] call BIS_fnc_param;
//Spawn Marker, Spawn Name, PathToImage
switch (_side) do
{
case west: {
_return = [
["cop_spawn_1","Kavala HQ","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["cop_spawn_2","Pyrgos HQ","\a3\ui_f\data\map\MapControl\fuelstation_ca.paa"],
["cop_spawn_3","Athira HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"],
["cop_spawn_4","Air HQ","\a3\ui_f\data\map\Markers\NATO\b_air.paa"],
["cop_spawn_5","HW Patrol","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"]
];
};
case civilian: {
_return = [
["civ_spawn_10","Georgetown","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_20","La Rochelle","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_30","Lijinhaven","\a3\ui_f\data\map\MapControl\watertower_ca.paa"],
["civ_spawn_40","Balavu","\a3\ui_f\data\map\MapControl\watertower_ca.paa"]
];
if (license_civ_rebel) then {
_return pushBack ["rebel_hq","Rebellen HQ","\a3\ui_f\data\map\GroupIcons\badge_rotate_0_gs.paa"];
};
if(count life_houses > 0) then {
{
_pos = call compile format["%1",_x select 0];
_house = nearestBuilding _pos;
_houseName = getText(configFile >> "CfgVehicles" >> (typeOf _house) >> "displayName");
_return pushBack [format["house_%1",_house getVariable "uid"],_houseName,"\a3\ui_f\data\map\MapControl\lighthouse_ca.paa"];
} foreach life_houses;
};
};
case independent: {
_return = [
["medic_spawn_1","Kavala Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_2","Athira Regional","\a3\ui_f\data\map\MapControl\hospital_ca.paa"],
["medic_spawn_3","Pygros Hospital","\a3\ui_f\data\map\MapControl\hospital_ca.paa"]
];
};
};
_return;
Alles anzeigen
Danke, hat geklappt