Nein weil dann keins erstellt wird.
Weiß aber nicht mehr ganz ob da noch mehr war außer die 3 Sachen.
Nein weil dann keins erstellt wird.
Weiß aber nicht mehr ganz ob da noch mehr war außer die 3 Sachen.
Die gang.hpp
class Life_My_Gang_Diag {
idd = 2620;
name= "life_my_gang_menu";
movingEnable = 0;
enableSimulation = 1;
onLoad = "";
class controlsBackground {
class Life_RscTitleBackground: Life_RscText {
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.6;
h = (1 / 25);
};
class MainBackground: Life_RscText {
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.1;
y = 0.2 + (11 / 250);
w = 0.6;
h = 0.6 - (22 / 250);
};
};
class controls {
class Title: Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 2629;
text = "";
x = 0.1;
y = 0.2;
w = 0.6;
h = (1 / 25);
};
class GangMemberList: Life_RscListBox
{
idc = 2621;
text = "";
sizeEx = 0.035;
x = 0.11;
y = 0.26;
w = 0.350;
h = 0.370;
};
class CloseLoadMenu: Life_RscButtonMenu {
idc = -1;
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;call life_fnc_p_updateMenu";
x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
y = 0.8 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
class GangLeave: Life_RscButtonMenu {
idc = -1;
text = "$STR_Gang_Leave";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "call life_fnc_gangLeave";
x = 0.47;
y = 0.26;
w = (9 / 40);
h = (1 / 25);
};
class GangLock: Life_RscButtonMenu {
idc = 2622;
text = "$STR_Gang_UpgradeSlots";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "0 spawn life_fnc_gangUpgrade";
x = 0.47;
y = 0.31;
w = (9 / 40);
h = (1 / 25);
};
class GangKick: Life_RscButtonMenu {
idc = 2624;
text = "$STR_Gang_Kick";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "call life_fnc_gangKick";
x = 0.47;
y = 0.36;
w = (9 / 40);
h = (1 / 25);
};
class GangLeader: Life_RscButtonMenu {
idc = 2625;
text = "$STR_Gang_SetLeader";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "0 spawn life_fnc_gangNewLeader";
x = 0.47;
y = 0.41;
w = (9 / 40);
h = (1 / 25);
};
class InviteMember: GangLeader {
idc = 2630;
text = "$STR_Gang_Invite_Player";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "0 spawn life_fnc_gangInvitePlayer";
y = .51;
};
class DisbandGang: InviteMember {
idc = 2631;
text = "$STR_Gang_Disband_Gang";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "0 spawn life_fnc_gangDisband";
y = .46;
};
class ColorList: Life_RscCombo {
idc = 2632;
x = 0.47;
y = 0.56;
w = (9 / 40);
h = 0.03;
};
class GangBank: Title {
idc = 601;
style = 1;
text = "";
};
};
};
class Life_Create_Gang_Diag {
idd = 2520;
name= "life_my_gang_menu_create";
movingEnable = 0;
enableSimulation = 1;
onLoad = "0 spawn {waitUntil {!isNull (findDisplay 2524)}; ((findDisplay 2520) displayCtrl 2523) ctrlSetText format [localize ""STR_Gang_PriceTxt"",[(getNumber(missionConfigFile >> 'Life_Settings' >> 'gang_price'))] call life_fnc_numberText]};";
class controlsBackground {
class Life_RscTitleBackground: Life_RscText {
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.5;
h = 0.04;
};
class MainBackground: Life_RscText {
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.1;
y = 0.244;
w = 0.5;
h = 0.268;
};
};
class controls {
class InfoMsg: Life_RscStructuredText {
idc = 2524;
sizeEx = 0.020;
text = "";
x = 0.1;
y = 0.25;
w = 0.5;
h = 0.11;
};
class Title: Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = -1;
text = "$STR_Gang_Title";
x = 0.1;
y = 0.2;
w = 0.5;
h = 0.04;
};
class CloseLoadMenu: Life_RscButtonMenu {
idc = -1;
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;call life_fnc_p_updateMenu;";
x = 0.09925;
y = 0.52;
w = 0.15625;
h = 0.04;
};
class GangCreateField: Life_RscButtonMenu {
idc = -1;
text = "$STR_Gang_Create";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "call life_fnc_createGang";
x = 0.27;
y = 0.464;
w = 0.15625;
h = 0.04;
};
class CreateGangText: Life_RscEdit {
idc = 2522;
text = "Gang-Name";
x = 0.2;
y = 0.368;
w = 0.325;
h = 0.04;
};
class CreateGangTag: Life_RscEdit {
idc = 2523;
text = "Gang-Tag";
x = 0.19925;
y = 0.418;
w = 0.325;
h = 0.04;
};
};
};
Alles anzeigen
fn_createGang.sqf
#include "..\..\script_macros.hpp"
disableSerialization;
private _gangName = ctrlText (CONTROL(2520,2522));
private _gangTag = ctrlText (CONTROL(2520,2523));
private _length = count (toArray(_gangName));
private _chrByte = toArray (_gangName);
private _chrByteTag = toArray (_gangTag);
private _lengthTag = count (_chrByteTag);
private _allowed = toArray("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ ");
if (_length > 32) exitWith {hint localize "STR_GNOTF_Over32"};
if (_lengthTag > 4) exitWith {hint localize "STR_GNOTF_Over4"};
private _badChar = false;
{
if (!(_x in _allowed)) exitWith {_badChar = true;};
} forEach _chrByte;
if (_badChar) exitWith {hint localize "STR_GNOTF_IncorrectChar";};
{
if (!(_x in _allowed)) exitWith {_badCharTag = true;};
} forEach _chrByteTag;
if (_badChar) exitWith {hint localize "STR_GNOTF_IncorrectChar";};
if (_lengthTag > 1) then {_gangTag = format ["[%1]",_gangTag];};
if (BANK < (LIFE_SETTINGS(getNumber,"gang_price"))) exitWith {hint format [localize "STR_GNOTF_NotEnoughMoney",[((LIFE_SETTINGS(getNumber,"gang_price")) - BANK)] call life_fnc_numberText];};
if (life_HC_isActive) then {
[player,getPlayerUID player,_gangName ,_gangTag] remoteExec ["HC_fnc_insertGang",HC_Life];
} else {
[player,getPlayerUID player,_gangName ,_gangTag] remoteExec ["TON_fnc_insertGang",RSERV];
};
if (LIFE_SETTINGS(getNumber,"player_advancedLog") isEqualTo 1) then {
if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then {
advanced_log = format [localize "STR_DL_AL_createdGang_BEF",_gangName,(LIFE_SETTINGS(getNumber,"gang_price"))];
} else {
advanced_log = format [localize "STR_DL_AL_createdGang",profileName,(getPlayerUID player),_gangName,(LIFE_SETTINGS(getNumber,"gang_price"))];
};
publicVariableServer "advanced_log";
};
hint localize "STR_NOTF_SendingData";
closeDialog 0;
life_action_gangInUse = true;
Alles anzeigen
fn_insertGang.sqf
#include "\life_server\script_macros.hpp"
/*
File: fn_insertGang.sqf
Author: Bryan "Tonic" Boardwine
modified: moeck
Description:
Inserts the gang into the database. Including now clantags (moeck)
*/
params [
["_ownerID",objNull,[objNull]],
["_uid","",[""]],
["_gangName","",[""]],
["_gangTag","",[""]]
];
private _group = group _ownerID;
if (isNull _ownerID || _uid isEqualTo "" || _gangName isEqualTo "" || _gangTag isEqualTo "") exitWith {}; //Fail
_ownerID = owner _ownerID;
_gangName = [_gangName] call DB_fnc_mresString;
_gangTag = [_gangTag] call DB_fnc_mresString;
private _query = format ["selectGangID:%1:%2", _gangName,_gangTag];
private _queryResult = [_query, 2] call DB_fnc_asyncCall;
//Check to see if the gang name already exists.
if !(_queryResult isEqualTo []) exitWith {
[1,"There is already a gang created with that name or gang tag please pick another name or clantag."] remoteExecCall ["life_fnc_broadcast",_ownerID];
life_action_gangInUse = nil;
_ownerID publicVariableClient "life_action_gangInUse";
};
private _uidLike = format["%2%1%2", _uid, "%"];
_query = format ["selectGangIDFromMembers:%1", _uidLike];
_queryResult = [_query,2 ] call DB_fnc_asyncCall;
//Check to see if this person already owns or belongs to a gang.
if (!(count _queryResult isEqualTo 0)) exitWith {
[1,"You are currently already active in a gang, please leave the gang first."] remoteExecCall ["life_fnc_broadcast",_ownerID];
life_action_gangInUse = nil;
_ownerID publicVariableClient "life_action_gangInUse";
};
//Check to see if a gang with that name already exists but is inactive.
_query = format ["selectInactiveGang:%1:%2", _gangName, _gangTag];
_queryResult = [_query, 2] call DB_fnc_asyncCall;
private _gangMembers = [[_uid]] call DB_fnc_mresArray;
if !(_queryResult isEqualTo []) then {
_query = format ["updateGang:%1:%2:%3:%4:%5", (_queryResult select 0), _gangMembers, _gangName, _gangTag,_uid];
} else {
_query = format ["insertGang:%1:%2:%3:%4", _uid, _gangName, _gangMembers, _gangTag];
};
_queryResult = [_query,1] call DB_fnc_asyncCall;
_group setVariable ["gang_name",_gangName,true];
_group setVariable ["gang_owner",_uid,true];
_group setVariable ["gang_bank",0,true];
_group setVariable ["gang_maxMembers",8,true];
_group setVariable ["gang_members",[_uid],true];
_group setVariable ["gang_tag",_gangTag,true];
[_group] remoteExecCall ["life_fnc_gangCreated",_ownerID];
uiSleep 0.35;
_query = format ["selectGangIDFromOwner:%1", _uid];
_queryResult = [_query, 2] call DB_fnc_asyncCall;
_group setVariable ["gang_id", (_queryResult select 0), true];
Alles anzeigen
Hab da glaube ich noch eins hierfür rumfliegen. Lass mich mal kurz suchen
Leider gibt es kein Menü wo man das Nummernschild abfragen kann :c
Ja kann ich auch die Tage schnell was machen
Wie siehts aus?
Mache ich die Tage. Habe gestern geheiratet und hatte dementsprechend keine Zeit
Haha Risk,
Wenn das nun noch so zu erweitern ist,, dass man direkt die items aus dem eigenen Fahrzeug verarbeiten kann, auch wenn mehrere Leite mit Fahrzeugen da stehen, dann muss ich leider brüllen : " Risk ich will ein Kind von dir! Heirate mich."
Genau sowas versuche ich grad.
Ja kann ich mich die tage dran setzen. Morgen erstmal heiraten
Vllt weil du die skills nicht hast?
Weil bei mir läufts
Servus Leute.
Hier mal eine fn_processAction von mir. Ihr habt eine Zeit Pro Item + Abfrage für einen Skill von Maverick.
Ja mehr gibt es da nicht zu sagen
Bei Verbesserungen bitte melden.
Kann auch leider keine Commands in das Script machen oder schritt für schritt Anleitung weil ich einiges verändert habe.
Hier ein Config Beispiel
Die Zeit ist hier die Zeit Pro Item in Sekunden. Das heißt Pro Item benötigt ihr hier 8 Sekunden.
fn_processAction.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_processAction.sqf
Author: Bryan "Tonic" Boardwine
Modified : NiiRoZz
rewriten by Risk
Description:
Master handling for processing an item.
NiiRoZz : Added multiprocess
*/
params[
["_vendor", objNull, [objNull]],
"",
"",
["_type", "", [""]]
];
//Error check
if (isNull _vendor || _type isEqualTo "" || (player distance _vendor > 10)) exitWith {};
life_action_inUse = true; //Lock out other actions during processing.
private _materialsRequired = M_CONFIG(getArray, "ProcessAction", _type, "MaterialsReq");
private _materialsGiven = M_CONFIG(getArray, "ProcessAction", _type, "MaterialsGive");
private _processTime = M_CONFIG(getNumber, "ProcessAction", _type, "time");
private _neededLicense = M_CONFIG(getText, "ProcessAction", _type, "benoetigteLizenz");
private _text = M_CONFIG(getText, "ProcessAction", _type, "Text");
//private _xpToAdd = M_CONFIG(getNumber, "ProcessAction", _type, "XPtoAdd");
private _noLicenseCost = M_CONFIG(getNumber, "ProcessAction", _type, "noLicenseCost");
_processTime = _processTime - missionNamespace["mav_ttm_var_processMultiplier",0];
if(isLocalized _text) then{
_text = localize _text;
}else{
diag_log format["::::processAction - %1[TYPE:%2] wurde nicht localized", _text, _type];
diag_log format["::::processAction - %1[TYPE:%2] wurde nicht localized", _text, _type];
diag_log format["::::processAction - %1[TYPE:%2] wurde nicht localized", _text, _type];
};
private _itemInfo = [_materialsRequired, _materialsGiven, format ["%1", _text]];
if (count _itemInfo isEqualTo 0) exitWith {
life_action_inUse = false;
};
//Setup vars.
_itemInfo params[
"_oldItem",
"_newItem",
"_upp"
];
_exit = false;
if (count _oldItem isEqualTo 0) exitWith {
life_action_inUse = false;
};
if !(getText(missionConfigFile >> "ProcessAction" >> _type >> "skill") isEqualTo "NONE" OR [life_currentExpPerks, getText(missionConfigFile >> "ProcessAction" >> _type >> "skill")] call mav_ttm_fnc_hasPerk) exitWith{
hint format["Du benötigst den %1 Skill um hier zu verarbeiten!", getText(missionConfigFile >> "Maverick_TTM" >> "perks" >> getText(missionConfigFile >> "ProcessAction" >> _type >> "skill") >> "displayName")];
life_action_inUse = false;
life_is_processing = false;
};
private _totalConversions = [];
{
_var = ITEM_VALUE(_x select 0);
if (_var isEqualTo 0) exitWith {
_exit = true;
};
if (_var < (_x select 1)) exitWith {
_exit = true;
};
_totalConversions pushBack(floor(_var / (_x select 1)));
} forEach _oldItem;
//private _xpToAddEnd = format["ItemProcessed_%1", _xpToAdd];
if (_exit) exitWith {
life_is_processing = false;
hint "Es gibt nicht's (nicht's mehr) zum verarbeiten!";
life_action_inUse = false;
};
private _hasLicense = false;
_hasLicense = LICENSE_VALUE(_neededLicense, "civ");
private _minimumConversions = _totalConversions call BIS_fnc_lowestNum;
private _oldItemWeight = 0;
{
_weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1);
_oldItemWeight = _oldItemWeight + _weight;
}count _oldItem;
_newItemWeight = 0;
{
_weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1);
_newItemWeight = _newItemWeight + _weight;
} count _newItem;
_exit = false;
if (_newItemWeight > _oldItemWeight) then {
_netChange = _newItemWeight - _oldItemWeight;
_freeSpace = life_maxWeight - life_carryWeight;
if (_freeSpace < _netChange) exitWith {
_exit = true;
};
private _estConversions = floor(_freeSpace / _netChange);
if (_estConversions < _minimumConversions) then {
_minimumConversions = _estConversions;
};
};
if (!_hasLicense) then {
private _licenseText = M_CONFIG(getText, "Licenses", _neededLicense, "displayName");
private _action = [
format["Dir fehlt die %1, willst du trotzdem verarbeiten? Es würde dich %2 %3 kosten.", localize _licenseText, _noLicenseCost, (localize "STR_Item_Money")],
format["%1", _text],
localize "STR_Global_Yes",
localize "STR_Global_No"
] call BIS_fnc_guiMessage;
if (_action) then {
if (CASH < _noLicenseCost) then {
hint "Du hast leider nicht genug Geld dabei!";
_exit = true;
}else{
CASH = CASH - _noLicenseCost;
_hasLicense = true;
};
}else{
_exit = true;
};
};
if (_exit) exitWith {
life_is_processing = false;
life_action_inUse = false;
};
//Setup our progress bar.
disableSerialization;
"progressBar" cutRsc ["life_progress", "PLAIN", 2, false];
private _ui = uiNamespace getVariable "life_progress";
private _progress = _ui displayCtrl 38201;
private _pgText = _ui displayCtrl 38202;
_pgText ctrlSetText format["%1", _upp];
_progress progressSetPosition 0.01;
private _cP = 0.01;
_dauerInSek = 0;
private _processRuns = 0;
{
_dauerInSek = (_x select 1) * _minimumConversions;
} count _newItem;
_dauerInSek = _dauerInSek * _processTime;
private _anzahlPausen = _dauerInSek / 0.1;
private _fortschrittProIntervall = 1.10 / _anzahlPausen;
if _hasLicense then {
life_is_processing = true;
};
if (!life_is_processing) exitWith {
hint "verarbeiten abgebrochen!";
"progressBar" cutText ["", "PLAIN"];
life_is_processing = false;
life_action_inUse = false;
};
for "_i" from 0 to 1 step 0 do {
uiSleep 0.1;
_cP = _cP + _fortschrittProIntervall;
_progress progressSetPosition _cP;
_pgText ctrlSetText format["%1", _upp];
if (_cP >= 1) exitWith {};
if (player distance _vendor > 10) exitWith {
hint localize "STR_Process_Stay";
"progressBar" cutText ["", "PLAIN"];
life_is_processing = false;
life_action_inUse = false;
};
};
if (player distance _vendor > 10) exitWith {
hint localize "STR_Process_Stay";
"progressBar" cutText ["", "PLAIN"];
life_is_processing = false;
life_action_inUse = false;
};
{
[false,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
} count _oldItem;
{
[true,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
} count _newItem;
"progressBar" cutText ["", "PLAIN"];
player playMoveNow "Stand";
life_is_processing = false;
life_action_inUse = false;
//[_xpToAddEnd] spawn mav_ttm_fnc_addExp;
Alles anzeigen
Wenn ihr script Ideen habt lasst es mich wissen. Ich werde diese dann immer im Stream mit euch umsetzten.
Danke für das Tut aber es wäre totaaaal toll, wenn du die Sachen, die du genau geändert hast, beschreiben würdest. So einfache copy&paste Tut's sind zwar für Anfänger super easy, aber man lernt nichts draus und andere, die ihr System schon stark verändert haben, müssen sich jetzt durch deine Dateien wurschteln, um zu sehen, was du genau gemacht hast.
Ziege.
Ja muss ich aber leider morgen machen Oder bist du mit Commands zufrieden?
Im Heutigen Stream habe ich dies hier fertig gestellt.
Wenn ihr nicht genug Geld auf der Hand habt ist es Rot, wenn ihr genug habt Grün. Logisch oder?
Ihr könnt es gerne benutzten. Schaut doch gerne mal vorbei und last ein follow da um Zukünftig nichts zu verpassen! https://www.twitch.tv/theriskarma
Ersetzt einfach jede Datei.
fn_clothingFiler.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_clothingFilter.sqf
Author: Bryan "Tonic" Boardwine
Description:
Functionality for filtering clothing types in the menu.
*/
disableSerialization;
params [
"", //Control
["_selection", 0, [0]]
];
life_clothing_filter = _selection;
switch (_selection) do {
case 4: {
life_shop_cam camSetTarget (player modelToWorld [0,-.15,1.3]);
life_shop_cam camSetPos (player modelToWorld [1,-4,2]);
life_shop_cam camCommit 1;
};
case 0: {
life_shop_cam camSetTarget (player modelToWorld [0,0,1]);
life_shop_cam camSetPos (player modelToWorld [1,4,2]);
life_shop_cam camCommit 1;
};
case 3: {
life_shop_cam camSetTarget (player modelToWorld [0,0,1.4]);
life_shop_cam camSetPos (player modelToWorld [-.1,2,1.4]);
life_shop_cam camCommit 1;
};
default {
life_shop_cam camSetTarget (player modelToWorld [0,0,1.6]);
life_shop_cam camSetPos (player modelToWorld [-.5,1,1.6]);
life_shop_cam camCommit 1;
};
};
if (isNull (findDisplay 3100)) exitWith {};
private _list = CONTROL(3100,3101);
private _idcItemlist = 1;
lbClear _list;
private _configArray = switch (_selection) do {
case 0: {M_CONFIG(getArray,"Clothing",life_clothing_store,"uniforms");};
case 1: {M_CONFIG(getArray,"Clothing",life_clothing_store,"headgear");};
case 2: {M_CONFIG(getArray,"Clothing",life_clothing_store,"goggles");};
case 3: {M_CONFIG(getArray,"Clothing",life_clothing_store,"vests");};
case 4: {M_CONFIG(getArray,"Clothing",life_clothing_store,"backpacks");};
};
private "_pic";
private "_details";
{
_x params [
["_className", "NONE", [""]],
["_displayName", "", [""]],
["_price", 1000, [0]]
];
if !(_className isEqualTo "NONE") then {
_details = [_className] call life_fnc_fetchCfgDetails;
_pic = (_details select 2);
};
if ([_x] call life_fnc_levelCheck) then {
if (isNil "_details") then {
_list lbAdd _displayName;
_list lbSetData [(lbSize _list)-1,_className];
} else {
if (_displayName isEqualTo "") then {
_list lbAdd (_details select 1);
} else {
_list lbAdd _displayName;
};
_list lbSetData [(lbSize _list)-1,_className];
_list lbSetValue [(lbSize _list)-1,_price];
_list lbSetPicture [(lbSize _list)-1,_pic];
if (_price <= life_cash) then {
lbSetColor [3101, _idcItemlist, [0.039,0.722,0.027,1]];
}else{
lbSetColor [3101, _idcItemlist, [0.812,0.039,0.039,1]];
};
_idcItemlist = _idcItemlist + 1;
};
};
true
} count _configArray;
Alles anzeigen
fn_vehicleShopMenu.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_vehicleShopMenu.sqf
Author: Bryan "Tonic" Boardwine
Description:
Blah
*/
(_this select 3) params [
["_shop","",[""]],
["_sideCheck",sideUnknown,[civilian]],
["_spawnPoints","",["",[]]],
["_shopFlag","",[""]],
["_shopTitle","",[""]],
["_disableBuy",false,[true]]
];
private _buyMultiplier = 0;
private _price = 0;
private _idcItemlist = 0;
switch (playerSide) do {
case civilian: {
_buyMultiplier = LIFE_SETTINGS(getNumber,"vehicle_purchase_multiplier_CIVILIAN");
};
case west: {
_buyMultiplier = LIFE_SETTINGS(getNumber,"vehicle_purchase_multiplier_COP");
};
case independent: {
_buyMultiplier = LIFE_SETTINGS(getNumber,"vehicle_purchase_multiplier_MEDIC");
};
case east: {
_buyMultiplier = LIFE_SETTINGS(getNumber,"vehicle_purchase_multiplier_OPFOR");
};
};
disableSerialization;
//Long boring series of checks
if (dialog) exitWith {};
if (_shop isEqualTo "") exitWith {};
if (!(_sideCheck isEqualTo sideUnknown) && {!(playerSide isEqualTo _sideCheck)}) exitWith {hint localize "STR_Shop_Veh_NotAllowed"};
private _conditions = M_CONFIG(getText,"CarShops",_shop,"conditions");
if !([_conditions] call life_fnc_levelCheck) exitWith {hint localize "STR_Shop_Veh_NotAllowed"};
if (LIFE_SETTINGS(getNumber,"vehicleShop_3D") isEqualTo 1) then {
createDialog "Life_Vehicle_Shop_v2_3D";
} else {
createDialog "Life_Vehicle_Shop_v2";
};
life_veh_shop = [_shop,_spawnpoints,_shopFlag,_disableBuy]; //Store it so so other parts of the system can access it.
ctrlSetText [2301,_shopTitle];
if (_disableBuy) then {
//Disable the buy button.
ctrlEnable [2309,false];
};
//Fetch the shop config.
_vehicleList = M_CONFIG(getArray,"CarShops",_shop,"vehicles");
private _control = CONTROL(2300,2302);
lbClear _control; //Flush the list.
ctrlShow [2330,false];
ctrlShow [2304,false];
//Loop through
{
_x params["_className"];
private _toShow = [_x] call life_fnc_levelCheck;
if (_toShow) then {
_vehicleInfo = [_className] call life_fnc_fetchVehInfo;
_control lbAdd (_vehicleInfo select 3);
_control lbSetPicture [(lbSize _control)-1,(_vehicleInfo select 2)];
_control lbSetData [(lbSize _control)-1,_className];
_control lbSetValue [(lbSize _control)-1,_forEachIndex];
_initalPrice = M_CONFIG(getNumber,"LifeCfgVehicles",_className,"price");
_price = round(_initalPrice * _buyMultiplier);
if (_price <= life_cash) then {
lbSetColor [2302, _idcItemlist, [0.039,0.722,0.027,1]];
}else{
lbSetColor [2302, _idcItemlist, [0.812,0.039,0.039,1]];
};
};
_idcItemlist = _idcItemlist + 1;
} forEach _vehicleList;
((findDisplay 2300) displayCtrl 2302) lbSetCurSel 0;
Alles anzeigen
fn_virt_update.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_virt_update.sqf
Author: Bryan "Tonic" Boardwine
Description:
Update and fill the virtual shop menu.
*/
disableSerialization;
//Setup control vars.
private _item_list = CONTROL(2400,2401);
private _gear_list = CONTROL(2400,2402);
private _idcItemlist = 0;
private _price = 0;
//Purge list
lbClear _item_list;
lbClear _gear_list;
if (!isClass(missionConfigFile >> "VirtualShops" >> life_shop_type)) exitWith {closeDialog 0; hint localize "STR_NOTF_ConfigDoesNotExist";}; //Make sure the entry exists..
ctrlSetText[2403,localize (M_CONFIG(getText,"VirtualShops",life_shop_type,"name"))];
private _shopItems = M_CONFIG(getArray,"VirtualShops",life_shop_type,"items");
{
if (getText(missionConfigFile >> "VirtualItems" >> _x >> "condition") isEqualTo "NONE" OR [life_currentExpPerks, getText(missionConfigFile >> "VirtualItems" >> _x >> "condition")] call mav_ttm_fnc_hasPerk) then{
_displayName = M_CONFIG(getText,"VirtualItems",_x,"displayName");
_price = M_CONFIG(getNumber,"VirtualItems",_x,"buyPrice");
_item_list lbAdd format ["%1 ($%2)",(localize _displayName),[_price] call life_fnc_numberText];
_item_list lbSetData [(lbSize _item_list)-1,_x];
_item_list lbSetValue [(lbSize _item_list)-1,_price];
_icon = M_CONFIG(getText,"VirtualItems",_x,"icon");
if !(_icon isEqualTo "") then {
_item_list lbSetPicture [(lbSize _item_list)-1,_icon];
};
if (_price <= life_cash) then {
lbSetColor [2401, _idcItemlist, [0.039,0.722,0.027,1]];
}else{
lbSetColor [2401, _idcItemlist, [0.812,0.039,0.039,1]];
};
};
_idcItemlist = _idcItemlist + 1;
} forEach _shopItems;
{
private _name = M_CONFIG(getText,"VirtualItems",_x,"displayName");
_val = ITEM_VALUE(_x);
if (_val > 0) then {
_gear_list lbAdd format ["%2 [x%1]",_val,(localize _name)];
_gear_list lbSetData [(lbSize _gear_list)-1,_x];
_icon = M_CONFIG(getText,"VirtualItems",_x,"icon");
if (!(_icon isEqualTo "")) then {
_gear_list lbSetPicture [(lbSize _gear_list)-1,_icon];
};
};
} forEach _shopItems;
Alles anzeigen
fn_weaponShopFilter.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_weaponShopFilter.sqf
Author: Bryan "Tonic" Boardwine
Edit: Added level checks - BoGuu
Description:
Applies the filter selected and changes the list.
*/
private _index = (lbCurSel 38402);
private _shop = uiNamespace getVariable ["Weapon_Shop",""];
private _idcItemlist = 0;
private _price = 0;
if (_index isEqualTo -1 || {_shop isEqualTo ""}) exitWith {systemChat "Bad Data Filter"; closeDialog 0;}; //Bad data passing.
uiNamespace setVariable ["Weapon_Shop_Filter",_index];
//Setup List Control & Purge it.
private _priceTag = ((findDisplay 38400) displayCtrl 38404);
_priceTag ctrlSetStructuredText parseText "";
private _itemList = ((findDisplay 38400) displayCtrl 38403);
lbClear _itemList;
private "_config";
if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 1 || {(uiNamespace getVariable ["Weapon_Accessories",0]) isEqualTo 1}) then {
if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 1) then {
_config = M_CONFIG(getArray,"WeaponShops",_shop,"mags");
{
_bool = [_x] call life_fnc_levelCheck;
if (_bool) then {
_x params ["_var"];
_count = {_x == _var} count (uiNamespace getVariable ["Magazine_Array",[]]);
if (_count > 0) then {
_itemInfo = [(_x select 0)] call life_fnc_fetchCfgDetails;
_itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {(_x select 1)} else {(_itemInfo select 1)}];
_itemList lbSetData[(lbSize _itemList)-1,(_itemInfo select 0)];
_itemList lbSetPicture[(lbSize _itemList)-1,(_itemInfo select 2)];
_itemList lbSetValue[(lbSize _itemList)-1,(_x select 2)];
//Buggy?
_price = _x select 2;
if (_price <= life_cash) then {
lbSetColor [38403, _idcItemlist, [0.039,0.722,0.027,1]];
}else{
lbSetColor [38403, _idcItemlist, [0.812,0.039,0.039,1]];
};
_idcItemlist = _idcItemlist + 1;
};
};
true
} count _config;
((findDisplay 38400) displayCtrl 38406) ctrlSetText localize "STR_Global_Weapons";
ctrlShow [38406,true];
ctrlShow [38407,false];
} else {
_config = M_CONFIG(getArray,"WeaponShops",_shop,"accs");
{
_bool = [_x] call life_fnc_levelCheck;
if (_bool) then {
_x params ["_var"];
_count = {_x == _var} count (uiNamespace getVariable ["Accessories_Array",[]]);
if (_count > 0) then {
_itemInfo = [(_x select 0)] call life_fnc_fetchCfgDetails;
_itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {(_x select 1)} else {(_itemInfo select 1)}];
_itemList lbSetData[(lbSize _itemList)-1,(_itemInfo select 0)];
_itemList lbSetPicture[(lbSize _itemList)-1,(_itemInfo select 2)];
_itemList lbSetValue[(lbSize _itemList)-1,(_x select 2)];
_price = _x select 2;
if (_price <= life_cash) then {
lbSetColor [38403, _idcItemlist, [0.039,0.722,0.027,1]];
}else{
lbSetColor [38403, _idcItemlist, [0.812,0.039,0.039,1]];
};
_idcItemlist = _idcItemlist + 1;
};
};
true
} count _config;
((findDisplay 38400) displayCtrl 38407) ctrlSetText localize "STR_Global_Weapons";
ctrlShow [38406,false];
ctrlShow [38407,true];
};
((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Buy";
ctrlShow [38402,false];
} else {
switch (_index) do {
case 0: {
_config = M_CONFIG(getArray,"WeaponShops",_shop,"items");
{
_bool = [_x] call life_fnc_levelCheck;
if (_bool) then {
_itemInfo = [_x select 0] call life_fnc_fetchCfgDetails;
_itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {_x select 1} else {_itemInfo select 1}];
_itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
_itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
_itemList lbSetValue[(lbSize _itemList)-1,_x select 2];
_price = _x select 2;
if (_price <= life_cash) then {
lbSetColor [38403, _idcItemlist, [0.039,0.722,0.027,1]];
}else{
lbSetColor [38403, _idcItemlist, [0.812,0.039,0.039,1]];
};
_idcItemlist = _idcItemlist + 1;
};
true
} count _config;
((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Buy";
((findDisplay 38400) displayCtrl 38406) ctrlSetText localize "STR_Global_Mags";
((findDisplay 38400) displayCtrl 38407) ctrlSetText localize "STR_Global_Accs";
ctrlShow [38402,true];
ctrlShow [38406,true];
ctrlShow [38407,true];
};
case 1: {
_config = [];
private _listedItems = [];
//Go through weapons
if (primaryWeapon player != "") then {_config pushBack primaryWeapon player;};
if (secondaryWeapon player != "") then {_config pushBack secondaryWeapon player;};
if (handgunWeapon player != "") then {_config pushBack handgunWeapon player;};
//Go through items
_config = _config + primaryWeaponItems player;
_config = _config + (assignedItems player);
_config = _config + (uniformItems player);
_config = _config + (vestItems player);
_config = _config + (backpackItems player);
((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Sell";
ctrlShow [38402,true];
ctrlShow [38406,false];
ctrlShow [38407,false];
private _itemArray = [];
_itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"items");
_itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"mags");
_itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"accs");
{
_y = _x;
{
if (!(_x in _listedItems) && _x != "") then {
_iS = [_x,_y] call TON_fnc_index;
if !(_iS isEqualTo -1) then {
_z = _y select _iS;
if (!((_z select 3) isEqualTo -1)) then {
_bool = [_z] call life_fnc_levelCheck;
if (_bool) then {
_itemInfo = [_x] call life_fnc_fetchCfgDetails;
_listedItems pushBack _x;
_itemCount = {_x == (_itemInfo select 0)} count _config;
if (_itemCount > 1) then {
_itemList lbAdd format ["[%2] %1",_itemInfo select 1,_itemCount];
} else {
_itemList lbAdd format ["%1",_itemInfo select 1];
};
_itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
_itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
};
};
};
};
true
} count _config;
true
} count _itemArray;
};
};
};
((findDisplay 38400) displayCtrl 38403) lbSetCurSel 0;
Alles anzeigen
Ja es funktioniert in der 5.0 allerdings scheinbar mit einem kleinem Fehler.
Helikopter werden durch fehlendes Kennzeichen nicht in der Datenbank erstellt :O
Bin erst die tage wieder am rechner. War jetzt 3 Wochen nicht Zuhause. Sollte aber nur eine abfrage sein ob es ein Auto oder helikopter ist.
Würde euch allen gerne mal das Minecraft Projekt "Minetropia" vorstellen wo ich derzeit ein wenig am unterstützen bin.
Ich übernehme einfach mal Den Text welchen die Herrschaften geschrieben haben.
_________________________________________________________________________
Citybuild- und Freebuild Server der allen Spielern die Möglichkeit bietet Minecraft zu spielen wie Notch es schuf.
Aktuell befinden sich unsere 4 Server auf der neuesten Version (1.14)
Entscheide du dich wie du Leben möchtest ! Alleine in der Wildnis um das Überleben kämpfen oder doch lieber der Kampf um den besten Vorgarten im Citybuild? Egal wofür ihr euch entscheidet wir sorgen dafür das ihr an dem Spiel spaß habt.
Im Citybuild erhält jeder ein Plot das 42 Blöcke x 42 Blöcke groß ist. Wie bitte ? Das Reicht niemals für eure Kunstwerke aus? Kein Problem solang ihr das nötige Kleingeld in den Taschen habt (In-Game Money) könnt ihr mit /merge aus maximal 4 Grundstücken ein riesiges GS machen.
Die Materialien zum Bauen könnt ihr in der Farmwelt erhalten. Die Farmwelt wird regelmäßig resetet und gewartet.
In dem Adminshop könnt ihr daher euer Geld verdienen indem ihr eure Items verkauft oder ich kauft euch nützliche Blöcke, Items, und Keys die ihr für verschiedene Cases benutzen könnt in welchen immer ein Checkpot liegt. Oder ihr eröffnet euer eigenes Shop Imperium und seid der König auf dem markt. Kaufe und Verkaufe daher soviel du kannst.
Mit dem level system kannst du speziell auf deinem Lieblingsgebiet arbeiten. Gehe Minen oder Holzhacken! Trainiere dich in der Schwertkunst oder bleibt mit deinem Bogen auf sicherer Distanz. In unserer Arena könnt ihr euer können unter Beweis stellen in dem ihr all eure Feinde vernichtet.
Wir haben verschiedene Plugins auf unserem server die euch Helfen und in den meisten Situationen nützlich sind! Zum Beispiel wird durch das Stack Plugin unnötiger Speicherplatz erhalten in dem Mobs und Items die in der Welt Orientierungslos unterwegs sind Gestackt werden.
Na neugierig ? dann betrete zusammen mit deinen Freunden die Welt von Minetropia!
_________________________________________________________________________
Der Discord: https://discord.gg/XYBBVp
Die Server IP: 78.31.71.185
Version: 1.14.2
Ein Paar Bilder..
Case-opening wie bei CSGO
Die Lobby
Die PvP Arena
Freebuild Spawn
in der .hpp
Hey wenn wir spawnen bekommt man schaden. Weiß jemand woran es liegen kann
this enableDamage false; vor dem Spawn. Und wenn er gespawnnt ist this enableDamage true;
oh du weiße magische Kugel.. was möchte der Themenstarter uns nur mitteilen?
Logs..Logs..Logs..
Ports frei?
Keine Fragezeichen senden sondern irgendwelche NPC's mit Dealer_1, Dealer_2, Dealer_3 bennen!
Die init vom life server bearbeiten. Dort steht das. Und die npcs müssen auf der map sein und müssen die Dealer init haben