-
Posts
58 -
Joined
-
Last visited
Content Type
Profiles
Forums
Articles
Posts posted by orionjade
-
-
2 hours ago, theduke said:
I personally think its a good idea that this script removes the key. Like me, I have it so players can transfer vehicles from cherno to taviana.
Also, it teaches players to make copies of their keys. If they have a masterkey, they SHOULD have copies...
Yes, except if their toolbelt is full and it drops on the ground and someone else finds it they now have a key to all the vehicles on that key.
-
59 minutes ago, kingpapawawa said:
wondering how this will fit in with masterkey... probably not so well since it takes the key.
It's possible to do, I did it on one of my servers, you just need to comment out a few lines.
In player_storeVehicle.sqf find
if(_charID != "0") then { [_unit,_key] call BIS_fnc_invRemove; cutText ["Key removed!", "PLAIN DOWN"]; };
and replace it with
/*if(_charID != "0") then { [_unit,_key] call BIS_fnc_invRemove; cutText ["Key removed!", "PLAIN DOWN"]; };*/
in getvehicle.sqf find
_inventory = (weapons player); _backpack = ((getWeaponCargo unitBackpack player) select 0); if (_result in (_inventory+_backpack)) then { if (_result in _inventory) then {cutText [format["Key [%1] already in your inventory!",_result], "PLAIN"];}; if (_result in _backpack) then {cutText [format["Key [%1] already in your backpack!",_result], "PLAIN"];}; } else { player addweapon _result; cutText [format["Key [%1] added to your inventory!",_result], "PLAIN"]; };
and replace it with
/*_inventory = (weapons player); _backpack = ((getWeaponCargo unitBackpack player) select 0); if (_result in (_inventory+_backpack)) then { if (_result in _inventory) then {cutText [format["Key [%1] already in your inventory!",_result], "PLAIN"];}; if (_result in _backpack) then {cutText [format["Key [%1] already in your backpack!",_result], "PLAIN"];}; } else { player addweapon _result; cutText [format["Key [%1] added to your inventory!",_result], "PLAIN"]; };*/
This will stop it from removing the key and also stop it from giving you another key when the vehicle is called from the garage.
-
-
9 hours ago, oldmatechoc said:
if (isNull findDisplay 24) exitWith {systemchat format ['open the chat, type the amount of %1 you want to give the player, if negitive type the number without - then add it and double click quickly',CurrencyName];};
this adds and subtracts
I've tried many times but can't get it to work.
-
Thank you, only issue I'm having it I can't remove coins from a player.
-
Can anyone update this to work with 1.0.6.1? I have seen the other ones that give a specific amount that is predefined in infistar but I prefer this version as you can pick the amount.
-
I had it happening on my test server, but I just edited the menu so it closes when spawn is clicked which solved the issue for me. Also saves a step from closing out of it after spawning the vehicle also.
-
Care to share?
There is also a dupe bug that if you spam the spawn button you can spawn in a bunch of the same vehicle, I found this out when I was testing the script on my test server.
-
Yes I added 50003 and 50004 to infistar.
I should be a little more clear. I'm referring to the garage menu option keeps flashing. If you are able to catch it the dialog opens just fine. I just need to get the garage menu option to not flash in the action menu on the left side of the screen.
-
I have this fully working but with a small issue. The garage option keeps flashing making it almost impossible to select. Anyone able to help with this?
Here is the garage part in my self actions, I had to edit it a little bit to get garage menu to show up instead of garage locked.
private ["_garageowner","_garagefriends","_garageallowed","_friend"];
if((_typeOfCursorTarget in DZE_Garage) && (speed player <= 1) && _canDo) then {
if (s_player_garage < 0) then {
_garageowner = _cursorTarget getVariable ["ownerPUID","0"];
_friend = _cursorTarget getVariable ["garagefriends",[]];
_garagefriends = [];
{
_garagefriends set [count _garagefriends,(_x select 0)];
} count _friend;
_garageallowed = [_garageowner] + _garagefriends;
if((getPlayerUID player) in _garageallowed) then {
s_player_garage = player addAction ["<t color='#FFAA00'>Garage Menu</t>", "custom\Garage\player_virtualgarage.sqf", _cursorTarget, 2, false];
} else {
s_player_garage = player addAction ["<t color='#FF0000'>Garage Locked</t>", "",_cursorTarget, 2, true, true, "", ""];
};
} else {
player removeAction s_player_garage;
s_player_garage = -1;
};
}; -
I get this error when i start the server
ErrorMessage: File mpmissions\__cur_mp.Chernarus\custom\keymaker\keymaker.hpp, line 5: /KeyMakerLega/controlsBackground.Lega_BG_Main: Undefined base class 'IGUIBACK'
This is with the updated version.
thx again for this script :) hope i can figure out the problem
I had this same issue. What I found out is the instructions say that if you already have a defines.hpp file that you don't need to include his. What the instructions didn't say is that you need to add
class IGUIBack { type = 0; idc = 124; style = 128; text = ""; colorText[] = { 0, 0, 0, 0 }; font = "Zeppelin32"; sizeEx = 0; shadow = 0; x = 0.1; y = 0.1; w = 0.1; h = 0.1; colorbackground[] = { "(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])", "(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])", "(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])", "(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])" }; };
the your defines.hpp, after I added this it started working.
Here is mine for an example
////////////////////////////////////////////////////////////////////////////// Styles///////////////////////////////////////////////////////////////////////////// Control types#define CT_STATIC 0#define CT_BUTTON 1#define CT_EDIT 2#define CT_SLIDER 3#define CT_COMBO 4#define CT_LISTBOX 5#define CT_TOOLBOX 6#define CT_CHECKBOXES 7#define CT_PROGRESS 8#define CT_HTML 9#define CT_STATIC_SKEW 10#define CT_ACTIVETEXT 11#define CT_TREE 12#define CT_STRUCTURED_TEXT 13#define CT_CONTEXT_MENU 14#define CT_CONTROLS_GROUP 15#define CT_SHORTCUTBUTTON 16#define CT_XKEYDESC 40#define CT_XBUTTON 41#define CT_XLISTBOX 42#define CT_XSLIDER 43#define CT_XCOMBO 44#define CT_ANIMATED_TEXTURE 45#define CT_OBJECT 80#define CT_OBJECT_ZOOM 81#define CT_OBJECT_CONTAINER 82#define CT_OBJECT_CONT_ANIM 83#define CT_LINEBREAK 98#define CT_USER 99#define CT_MAP 100#define CT_MAP_MAIN 101#define CT_LISTNBOX 102// Static styles#define ST_POS 0x0F#define ST_HPOS 0x03#define ST_VPOS 0x0C#define ST_LEFT 0x00#define ST_RIGHT 0x01#define ST_CENTER 0x02#define ST_DOWN 0x04#define ST_UP 0x08#define ST_VCENTER 0x0C#define ST_TYPE 0xF0#define ST_SINGLE 0x00#define ST_MULTI 0x10#define ST_TITLE_BAR 0x20#define ST_PICTURE 0x30#define ST_FRAME 0x40#define ST_BACKGROUND 0x50#define ST_GROUP_BOX 0x60#define ST_GROUP_BOX2 0x70#define ST_HUD_BACKGROUND 0x80#define ST_TILE_PICTURE 0x90#define ST_WITH_RECT 0xA0#define ST_LINE 0xB0#define ST_SHADOW 0x100#define ST_NO_RECT 0x200#define ST_KEEP_ASPECT_RATIO 0x800#define ST_TITLE ST_TITLE_BAR + ST_CENTER// Slider styles#define SL_DIR 0x400#define SL_VERT 0#define SL_HORZ 0x400#define SL_TEXTURES 0x10// progress bar#define ST_VERTICAL 0x01#define ST_HORIZONTAL 0// Listbox styles#define LB_TEXTURES 0x10#define LB_MULTI 0x20// Tree styles#define TR_SHOWROOT 1#define TR_AUTOCOLLAPSE 2// MessageBox styles#define MB_BUTTON_OK 1#define MB_BUTTON_CANCEL 2#define MB_BUTTON_USER 4//////////////////////////////////////////////////////////////////////////////////////////// Styles///////////////////////////////////////////////////////////////////////////// Control types#define CT_STATIC 0#define CT_BUTTON 1#define CT_EDIT 2#define CT_SLIDER 3#define CT_COMBO 4#define CT_LISTBOX 5#define CT_TOOLBOX 6#define CT_CHECKBOXES 7#define CT_PROGRESS 8#define CT_HTML 9#define CT_STATIC_SKEW 10#define CT_ACTIVETEXT 11#define CT_TREE 12#define CT_STRUCTURED_TEXT 13#define CT_CONTEXT_MENU 14#define CT_CONTROLS_GROUP 15#define CT_SHORTCUTBUTTON 16#define CT_XKEYDESC 40#define CT_XBUTTON 41#define CT_XLISTBOX 42#define CT_XSLIDER 43#define CT_XCOMBO 44#define CT_ANIMATED_TEXTURE 45#define CT_OBJECT 80#define CT_OBJECT_ZOOM 81#define CT_OBJECT_CONTAINER 82#define CT_OBJECT_CONT_ANIM 83#define CT_LINEBREAK 98#define CT_USER 99#define CT_MAP 100#define CT_MAP_MAIN 101#define CT_LISTNBOX 102// Static styles#define ST_POS 0x0F#define ST_HPOS 0x03#define ST_VPOS 0x0C#define ST_LEFT 0x00#define ST_RIGHT 0x01#define ST_CENTER 0x02#define ST_DOWN 0x04#define ST_UP 0x08#define ST_VCENTER 0x0C#define ST_TYPE 0xF0#define ST_SINGLE 0x00#define ST_MULTI 0x10#define ST_TITLE_BAR 0x20#define ST_PICTURE 0x30#define ST_FRAME 0x40#define ST_BACKGROUND 0x50#define ST_GROUP_BOX 0x60#define ST_GROUP_BOX2 0x70#define ST_HUD_BACKGROUND 0x80#define ST_TILE_PICTURE 0x90#define ST_WITH_RECT 0xA0#define ST_LINE 0xB0#define ST_SHADOW 0x100#define ST_NO_RECT 0x200#define ST_KEEP_ASPECT_RATIO 0x800#define ST_TITLE ST_TITLE_BAR + ST_CENTER// Slider styles#define SL_DIR 0x400#define SL_VERT 0#define SL_HORZ 0x400#define SL_TEXTURES 0x10// progress bar#define ST_VERTICAL 0x01#define ST_HORIZONTAL 0// Listbox styles#define LB_TEXTURES 0x10#define LB_MULTI 0x20// Tree styles#define TR_SHOWROOT 1#define TR_AUTOCOLLAPSE 2// MessageBox styles#define MB_BUTTON_OK 1#define MB_BUTTON_CANCEL 2#define MB_BUTTON_USER 4class RscBackground{type = 0;style = ST_BACKGROUND;shadow = 2;colorBackground[] = {0,0,0,1};colorText[] = {1,1,1,1};font = "Zeppelin32";sizeEx = 0.02;text = "";};class RscButton{access = 0;type = 1;text = "";colorText[] = {1,1,1,1};colorDisabled[] = {1,1,1,0.25};colorBackground[] = {0.45,0.45,0.45,1};colorBackgroundDisabled[] = {0,0,0,0.5};colorBackgroundActive[] = {0.75,0.75,0.75,1};colorFocused[] = {0.75,0.75,0.75,1};colorShadow[] = {0,0,0,0};colorBorder[] = {0,0,0,1};soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1};soundPush[] = {"\ca\ui\data\sound\new1",0,0};soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1};soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1};style = 2;x = 0;y = 0;w = 0.095589;h = 0.039216;shadow = 2;font = "Zeppelin32";sizeEx = 0.03921;offsetX = 0.003;offsetY = 0.003;offsetPressedX = 0.002;offsetPressedY = 0.002;borderSize = 0;};class RscFrame{type = 0;idc = -1;style = 64;shadow = 2;colorBackground[] = {0,0,0,0};colorText[] = {1,1,1,1};font = "Zeppelin32";sizeEx = 0.02;text = "";};class RscProgressF{type = 8;style = 0;colorFrame[] = {1,1,1,1};colorBar[] = {1,1,1,0.5};texture = "#(argb,8,8,3)color(1,1,1,1)";w = 1;h = 0.02;};/////////////class RscTextT{access = 0;type = 0;idc = -1;colorBackground[] = {0,0,0,0};colorText[] = {0.8784,0.8471,0.651,1};text = "";fixedWidth = 0;x = 0;y = 0;h = 0.037;w = 0.3;style = 0;shadow = 2;font = "Zeppelin32";SizeEx = 0.03921;};class RscEdit{access = 0;type = 2;x = 0;y = 0;h = 0.04;w = 0.2;colorBackground[] = {0,0,0,1};colorText[] = {0.95,0.95,0.95,1};colorSelection[] = {0.8784,0.8471,0.651,1};autocomplete = "";text = "";size = 0.2;style = "0x00 + 0x40";font = "Zeppelin32";shadow = 2;sizeEx = 0.03921;};class RscListBox{access = 0;type = 5;w = 0.4;h = 0.4;rowHeight = 0;colorText[] = {0.8784,0.8471,0.651,1};colorScrollbar[] = {0.95,0.95,0.95,1};colorSelect[] = {0.95,0.95,0.95,1};colorSelect2[] = {0.95,0.95,0.95,1};colorSelectBackground[] = {0,0,0,1};colorSelectBackground2[] = {0.8784,0.8471,0.651,1};colorBackground[] = {0,0,0,1};soundSelect[] = {"",0.1,1};soundExpand[] = {"",0.1,1};soundCollapse[] = {"",0.1,1};arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";arrowFull = "#(argb,8,8,3)color(1,1,1,1)";class ScrollBar{color[] = {1,1,1,0.6};colorActive[] = {1,1,1,1};colorDisabled[] = {1,1,1,0.3};shadow = 0;thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";border = "\ca\ui\data\ui_border_scroll_ca.paa";};style = 16;font = "Zeppelin32";shadow = 2;sizeEx = 0.03921;color[] = {1,1,1,1};period = 1.2;maxHistoryDelay = 1;autoScrollSpeed = -1;autoScrollDelay = 5;autoScrollRewind = 0;};class RscShortcutButton{type = 16;x = 0.1;y = 0.1;class HitZone{left = 0.004;top = 0.029;right = 0.004;bottom = 0.029;};class ShortcutPos{left = 0.0145;top = 0.026;w = 0.0392157;h = 0.0522876;};class TextPos{left = 0.05;top = 0.034;right = 0.005;bottom = 0.005;};shortcuts[] = {};textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)";color[] = {0.8784,0.8471,0.651,1};color2[] = {0.95,0.95,0.95,1};colorDisabled[] = {1,1,1,0.25};colorBackground[] = {1,1,1,1};colorBackground2[] = {1,1,1,0.4};class Attributes{font = "Zeppelin32";color = "#E5E5E5";align = "left";shadow = "true";};idc = -1;style = 0;default = 0;shadow = 2;w = 0.183825;h = 0.104575;periodFocus = 1.2;periodOver = 0.8;animTextureNormal = "\ca\ui\data\ui_button_normal_ca.paa";animTextureDisabled = "\ca\ui\data\ui_button_disabled_ca.paa";animTextureOver = "\ca\ui\data\ui_button_over_ca.paa";animTextureFocused = "\ca\ui\data\ui_button_focus_ca.paa";animTexturePressed = "\ca\ui\data\ui_button_down_ca.paa";animTextureDefault = "\ca\ui\data\ui_button_default_ca.paa";period = 0.4;font = "Zeppelin32";size = 0.03921;sizeEx = 0.03921;text = "";soundPush[] = { "", 0, 1 };soundEnter[] = { "", 0, 1 };soundClick[] ={ "", 0, 1 };soundEscape[] ={ "", 0, 1 };sound[] ={ "", 0, 1 };action = "";class AttributesImage{font = "Zeppelin32";color = "#E5E5E5";align = "left";};};class RscStructuredText{access = 0;type = 13;idc = -1;style = 0;colorText[] = {0.8784,0.8471,0.651,1};class Attributes{font = "Zeppelin32";color = "#e0d8a6";align = "center";shadow = 1;};x = 0;y = 0;h = 0.035;w = 0.1;text = "";size = 0.03921;shadow = 2;};class RscCombo{access = 0;type = 4;style = 0;colorSelect[] = {0,0,0,1};colorText[] = {1,1,1,1};colorBackground[] = {0,0,0,1};colorScrollbar[] = {1,0,0,1};soundSelect[] = {"",0.1,1};soundExpand[] = {"",0.1,1};soundCollapse[] = {"",0.1,1};maxHistoryDelay = 1;class ScrollBar{color[] = {1,1,1,1};colorActive[] = {0.8784,0.8471,0.651,1};colorDisabled[] = {0.8784,0.8471,0.651,1};shadow = 0;thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";border = "\ca\ui\data\ui_border_scroll_ca.paa";};x = 0;y = 0;w = 0.12;h = 0.035;shadow = 0;colorSelectBackground[] = {1,1,1,0.7};arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa";arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa";wholeHeight = 0.45;color[] = {0,0,0,0.6};colorActive[] = {1,0,0,1};colorDisabled[] = {1,1,1,0.25};font = "Zeppelin32";sizeEx = 0.03921;};class Zupa_RscButton {idc = -1;style = 0;default = 0;shadow = 1;w = 0.183825;h = "((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)";color[] = {1,1,1,1.0};colorFocused[] = {1,1,1,1.0};color2[] = {0.95,0.95,0.95,1};colorDisabled[] = {1,1,1,0.25};colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};colorBackground2[] = {1,1,1,1};periodFocus = 1.2;periodOver = 0.8;class HitZone{left = 0.0;top = 0.0;right = 0.0;bottom = 0.0;};class ShortcutPos{left = 0;top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";};class TextPos{left = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";right = 0.005;bottom = 0.0;};period = 0.4;font = "Zeppelin32";size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";text = "";action = "";class Attributes{font = "Zeppelin32";color = "#E5E5E5";align = "left";shadow = "true";};class AttributesImage{font = "Zeppelin32";color = "#E5E5E5";align = "left";};soundPush[] = { "", 0, 1 };soundEnter[] = { "", 0, 1 };soundClick[] ={ "", 0, 1 };soundEscape[] ={ "", 0, 1 };sound[] ={ "", 0, 1 };};class Zupa_RscButtonMenu : Zupa_RscButton{idc = -1;type = 16;style = "0x02 + 0xC0";default = 0;shadow = 0;x = 0;y = 0;w = 0.095589;h = 0.039216;animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";colorBackgroundFocused[] = {1,1,1,1};colorBackground2[] = {0.75,0.75,0.75,1};color[] = {1,1,1,1};colorFocused[] = {0,0,0,1};color2[] = {0,0,0,1};colorText[] = {1,1,1,1};colorDisabled[] = {1,1,1,0.25};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};period = 1.2;periodFocus = 1.2;periodOver = 1.2;size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";tooltipColorText[] = {1,1,1,1};tooltipColorBox[] = {1,1,1,1};tooltipColorShade[] = {0,0,0,0.65};class TextPos{left = "0.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)";top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";right = 0.005;bottom = 0.0;};class Attributes{font = "Zeppelin32";color = "#E5E5E5";align = "center";shadow = "false";};class ShortcutPos{left = "(6.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005";top = 0.005;w = 0.0225;h = 0.03;};textureNoShortcut = "";};class Zupa_RscEdit {type = 2;style = 0x00 + 0x40;font = "Zeppelin32";shadow = 2;sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";colorBackground[] = {0, 0, 0, 1};colorText[] = {0.95, 0.95, 0.95, 1};colorDisabled[] = {1, 1, 1, 0.25};autocomplete = false;colorSelection[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1};canModify = 1;soundPush[] = { "", 0, 1 };soundEnter[] = { "", 0, 1 };soundClick[] ={ "", 0, 1 };soundEscape[] ={ "", 0, 1 };sound[] ={ "", 0, 1 };};class IGUIBack{type = 0;idc = 124;style = 128;text = "";colorText[] ={0,0,0,0};font = "Zeppelin32";sizeEx = 0;shadow = 0;x = 0.1;y = 0.1;w = 0.1;h = 0.1;colorbackground[] ={"(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])","(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])"};};////////////////////////////////////////////////////////////////////////////// Styles///////////////////////////////////////////////////////////////////////////// Control types#define CT_STATIC 0#define CT_BUTTON 1#define CT_EDIT 2#define CT_SLIDER 3#define CT_COMBO 4#define CT_LISTBOX 5#define CT_TOOLBOX 6#define CT_CHECKBOXES 7#define CT_PROGRESS 8#define CT_HTML 9#define CT_STATIC_SKEW 10#define CT_ACTIVETEXT 11#define CT_TREE 12#define CT_STRUCTURED_TEXT 13#define CT_CONTEXT_MENU 14#define CT_CONTROLS_GROUP 15#define CT_SHORTCUTBUTTON 16#define CT_XKEYDESC 40#define CT_XBUTTON 41#define CT_XLISTBOX 42#define CT_XSLIDER 43#define CT_XCOMBO 44#define CT_ANIMATED_TEXTURE 45#define CT_OBJECT 80#define CT_OBJECT_ZOOM 81#define CT_OBJECT_CONTAINER 82#define CT_OBJECT_CONT_ANIM 83#define CT_LINEBREAK 98#define CT_USER 99#define CT_MAP 100#define CT_MAP_MAIN 101#define CT_LISTNBOX 102// Static styles#define ST_POS 0x0F#define ST_HPOS 0x03#define ST_VPOS 0x0C#define ST_LEFT 0x00#define ST_RIGHT 0x01#define ST_CENTER 0x02#define ST_DOWN 0x04#define ST_UP 0x08#define ST_VCENTER 0x0C#define ST_TYPE 0xF0#define ST_SINGLE 0x00#define ST_MULTI 0x10#define ST_TITLE_BAR 0x20#define ST_PICTURE 0x30#define ST_FRAME 0x40#define ST_BACKGROUND 0x50#define ST_GROUP_BOX 0x60#define ST_GROUP_BOX2 0x70#define ST_HUD_BACKGROUND 0x80#define ST_TILE_PICTURE 0x90#define ST_WITH_RECT 0xA0#define ST_LINE 0xB0#define ST_SHADOW 0x100#define ST_NO_RECT 0x200#define ST_KEEP_ASPECT_RATIO 0x800#define ST_TITLE ST_TITLE_BAR + ST_CENTER// Slider styles#define SL_DIR 0x400#define SL_VERT 0#define SL_HORZ 0x400#define SL_TEXTURES 0x10// progress bar#define ST_VERTICAL 0x01#define ST_HORIZONTAL 0// Listbox styles#define LB_TEXTURES 0x10#define LB_MULTI 0x20// Tree styles#define TR_SHOWROOT 1#define TR_AUTOCOLLAPSE 2// MessageBox styles#define MB_BUTTON_OK 1#define MB_BUTTON_CANCEL 2#define MB_BUTTON_USER 4//////////////////////////////////////////////////////////////////////////////////////////// Styles///////////////////////////////////////////////////////////////////////////// Control types#define CT_STATIC 0#define CT_BUTTON 1#define CT_EDIT 2#define CT_SLIDER 3#define CT_COMBO 4#define CT_LISTBOX 5#define CT_TOOLBOX 6#define CT_CHECKBOXES 7#define CT_PROGRESS 8#define CT_HTML 9#define CT_STATIC_SKEW 10#define CT_ACTIVETEXT 11#define CT_TREE 12#define CT_STRUCTURED_TEXT 13#define CT_CONTEXT_MENU 14#define CT_CONTROLS_GROUP 15#define CT_SHORTCUTBUTTON 16#define CT_XKEYDESC 40#define CT_XBUTTON 41#define CT_XLISTBOX 42#define CT_XSLIDER 43#define CT_XCOMBO 44#define CT_ANIMATED_TEXTURE 45#define CT_OBJECT 80#define CT_OBJECT_ZOOM 81#define CT_OBJECT_CONTAINER 82#define CT_OBJECT_CONT_ANIM 83#define CT_LINEBREAK 98#define CT_USER 99#define CT_MAP 100#define CT_MAP_MAIN 101#define CT_LISTNBOX 102// Static styles#define ST_POS 0x0F#define ST_HPOS 0x03#define ST_VPOS 0x0C#define ST_LEFT 0x00#define ST_RIGHT 0x01#define ST_CENTER 0x02#define ST_DOWN 0x04#define ST_UP 0x08#define ST_VCENTER 0x0C#define ST_TYPE 0xF0#define ST_SINGLE 0x00#define ST_MULTI 0x10#define ST_TITLE_BAR 0x20#define ST_PICTURE 0x30#define ST_FRAME 0x40#define ST_BACKGROUND 0x50#define ST_GROUP_BOX 0x60#define ST_GROUP_BOX2 0x70#define ST_HUD_BACKGROUND 0x80#define ST_TILE_PICTURE 0x90#define ST_WITH_RECT 0xA0#define ST_LINE 0xB0#define ST_SHADOW 0x100#define ST_NO_RECT 0x200#define ST_KEEP_ASPECT_RATIO 0x800#define ST_TITLE ST_TITLE_BAR + ST_CENTER// Slider styles#define SL_DIR 0x400#define SL_VERT 0#define SL_HORZ 0x400#define SL_TEXTURES 0x10// progress bar#define ST_VERTICAL 0x01#define ST_HORIZONTAL 0// Listbox styles#define LB_TEXTURES 0x10#define LB_MULTI 0x20// Tree styles#define TR_SHOWROOT 1#define TR_AUTOCOLLAPSE 2// MessageBox styles#define MB_BUTTON_OK 1#define MB_BUTTON_CANCEL 2#define MB_BUTTON_USER 4class RscBackground{type = 0;style = ST_BACKGROUND;shadow = 2;colorBackground[] = {0,0,0,1};colorText[] = {1,1,1,1};font = "Zeppelin32";sizeEx = 0.02;text = "";};class RscButton{access = 0;type = 1;text = "";colorText[] = {1,1,1,1};colorDisabled[] = {1,1,1,0.25};colorBackground[] = {0.45,0.45,0.45,1};colorBackgroundDisabled[] = {0,0,0,0.5};colorBackgroundActive[] = {0.75,0.75,0.75,1};colorFocused[] = {0.75,0.75,0.75,1};colorShadow[] = {0,0,0,0};colorBorder[] = {0,0,0,1};soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1};soundPush[] = {"\ca\ui\data\sound\new1",0,0};soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1};soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1};style = 2;x = 0;y = 0;w = 0.095589;h = 0.039216;shadow = 2;font = "Zeppelin32";sizeEx = 0.03921;offsetX = 0.003;offsetY = 0.003;offsetPressedX = 0.002;offsetPressedY = 0.002;borderSize = 0;};class RscFrame{type = 0;idc = -1;style = 64;shadow = 2;colorBackground[] = {0,0,0,0};colorText[] = {1,1,1,1};font = "Zeppelin32";sizeEx = 0.02;text = "";};class RscProgressF{type = 8;style = 0;colorFrame[] = {1,1,1,1};colorBar[] = {1,1,1,0.5};texture = "#(argb,8,8,3)color(1,1,1,1)";w = 1;h = 0.02;};/////////////class RscTextT{access = 0;type = 0;idc = -1;colorBackground[] = {0,0,0,0};colorText[] = {0.8784,0.8471,0.651,1};text = "";fixedWidth = 0;x = 0;y = 0;h = 0.037;w = 0.3;style = 0;shadow = 2;font = "Zeppelin32";SizeEx = 0.03921;};class RscEdit{access = 0;type = 2;x = 0;y = 0;h = 0.04;w = 0.2;colorBackground[] = {0,0,0,1};colorText[] = {0.95,0.95,0.95,1};colorSelection[] = {0.8784,0.8471,0.651,1};autocomplete = "";text = "";size = 0.2;style = "0x00 + 0x40";font = "Zeppelin32";shadow = 2;sizeEx = 0.03921;};class RscListBox{access = 0;type = 5;w = 0.4;h = 0.4;rowHeight = 0;colorText[] = {0.8784,0.8471,0.651,1};colorScrollbar[] = {0.95,0.95,0.95,1};colorSelect[] = {0.95,0.95,0.95,1};colorSelect2[] = {0.95,0.95,0.95,1};colorSelectBackground[] = {0,0,0,1};colorSelectBackground2[] = {0.8784,0.8471,0.651,1};colorBackground[] = {0,0,0,1};soundSelect[] = {"",0.1,1};soundExpand[] = {"",0.1,1};soundCollapse[] = {"",0.1,1};arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";arrowFull = "#(argb,8,8,3)color(1,1,1,1)";class ScrollBar{color[] = {1,1,1,0.6};colorActive[] = {1,1,1,1};colorDisabled[] = {1,1,1,0.3};shadow = 0;thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";border = "\ca\ui\data\ui_border_scroll_ca.paa";};style = 16;font = "Zeppelin32";shadow = 2;sizeEx = 0.03921;color[] = {1,1,1,1};period = 1.2;maxHistoryDelay = 1;autoScrollSpeed = -1;autoScrollDelay = 5;autoScrollRewind = 0;};class RscShortcutButton{type = 16;x = 0.1;y = 0.1;class HitZone{left = 0.004;top = 0.029;right = 0.004;bottom = 0.029;};class ShortcutPos{left = 0.0145;top = 0.026;w = 0.0392157;h = 0.0522876;};class TextPos{left = 0.05;top = 0.034;right = 0.005;bottom = 0.005;};shortcuts[] = {};textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)";color[] = {0.8784,0.8471,0.651,1};color2[] = {0.95,0.95,0.95,1};colorDisabled[] = {1,1,1,0.25};colorBackground[] = {1,1,1,1};colorBackground2[] = {1,1,1,0.4};class Attributes{font = "Zeppelin32";color = "#E5E5E5";align = "left";shadow = "true";};idc = -1;style = 0;default = 0;shadow = 2;w = 0.183825;h = 0.104575;periodFocus = 1.2;periodOver = 0.8;animTextureNormal = "\ca\ui\data\ui_button_normal_ca.paa";animTextureDisabled = "\ca\ui\data\ui_button_disabled_ca.paa";animTextureOver = "\ca\ui\data\ui_button_over_ca.paa";animTextureFocused = "\ca\ui\data\ui_button_focus_ca.paa";animTexturePressed = "\ca\ui\data\ui_button_down_ca.paa";animTextureDefault = "\ca\ui\data\ui_button_default_ca.paa";period = 0.4;font = "Zeppelin32";size = 0.03921;sizeEx = 0.03921;text = "";soundPush[] = { "", 0, 1 };soundEnter[] = { "", 0, 1 };soundClick[] ={ "", 0, 1 };soundEscape[] ={ "", 0, 1 };sound[] ={ "", 0, 1 };action = "";class AttributesImage{font = "Zeppelin32";color = "#E5E5E5";align = "left";};};class RscStructuredText{access = 0;type = 13;idc = -1;style = 0;colorText[] = {0.8784,0.8471,0.651,1};class Attributes{font = "Zeppelin32";color = "#e0d8a6";align = "center";shadow = 1;};x = 0;y = 0;h = 0.035;w = 0.1;text = "";size = 0.03921;shadow = 2;};class RscCombo{access = 0;type = 4;style = 0;colorSelect[] = {0,0,0,1};colorText[] = {1,1,1,1};colorBackground[] = {0,0,0,1};colorScrollbar[] = {1,0,0,1};soundSelect[] = {"",0.1,1};soundExpand[] = {"",0.1,1};soundCollapse[] = {"",0.1,1};maxHistoryDelay = 1;class ScrollBar{color[] = {1,1,1,1};colorActive[] = {0.8784,0.8471,0.651,1};colorDisabled[] = {0.8784,0.8471,0.651,1};shadow = 0;thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";border = "\ca\ui\data\ui_border_scroll_ca.paa";};x = 0;y = 0;w = 0.12;h = 0.035;shadow = 0;colorSelectBackground[] = {1,1,1,0.7};arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa";arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa";wholeHeight = 0.45;color[] = {0,0,0,0.6};colorActive[] = {1,0,0,1};colorDisabled[] = {1,1,1,0.25};font = "Zeppelin32";sizeEx = 0.03921;};class Zupa_RscButton {idc = -1;style = 0;default = 0;shadow = 1;w = 0.183825;h = "((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)";color[] = {1,1,1,1.0};colorFocused[] = {1,1,1,1.0};color2[] = {0.95,0.95,0.95,1};colorDisabled[] = {1,1,1,0.25};colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};colorBackground2[] = {1,1,1,1};periodFocus = 1.2;periodOver = 0.8;class HitZone{left = 0.0;top = 0.0;right = 0.0;bottom = 0.0;};class ShortcutPos{left = 0;top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";};class TextPos{left = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";right = 0.005;bottom = 0.0;};period = 0.4;font = "Zeppelin32";size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";text = "";action = "";class Attributes{font = "Zeppelin32";color = "#E5E5E5";align = "left";shadow = "true";};class AttributesImage{font = "Zeppelin32";color = "#E5E5E5";align = "left";};soundPush[] = { "", 0, 1 };soundEnter[] = { "", 0, 1 };soundClick[] ={ "", 0, 1 };soundEscape[] ={ "", 0, 1 };sound[] ={ "", 0, 1 };};class Zupa_RscButtonMenu : Zupa_RscButton{idc = -1;type = 16;style = "0x02 + 0xC0";default = 0;shadow = 0;x = 0;y = 0;w = 0.095589;h = 0.039216;animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";colorBackgroundFocused[] = {1,1,1,1};colorBackground2[] = {0.75,0.75,0.75,1};color[] = {1,1,1,1};colorFocused[] = {0,0,0,1};color2[] = {0,0,0,1};colorText[] = {1,1,1,1};colorDisabled[] = {1,1,1,0.25};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};period = 1.2;periodFocus = 1.2;periodOver = 1.2;size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";tooltipColorText[] = {1,1,1,1};tooltipColorBox[] = {1,1,1,1};tooltipColorShade[] = {0,0,0,0.65};class TextPos{left = "0.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)";top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";right = 0.005;bottom = 0.0;};class Attributes{font = "Zeppelin32";color = "#E5E5E5";align = "center";shadow = "false";};class ShortcutPos{left = "(6.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005";top = 0.005;w = 0.0225;h = 0.03;};textureNoShortcut = "";};class Zupa_RscEdit {type = 2;style = 0x00 + 0x40;font = "Zeppelin32";shadow = 2;sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";colorBackground[] = {0, 0, 0, 1};colorText[] = {0.95, 0.95, 0.95, 1};colorDisabled[] = {1, 1, 1, 0.25};autocomplete = false;colorSelection[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1};canModify = 1;soundPush[] = { "", 0, 1 };soundEnter[] = { "", 0, 1 };soundClick[] ={ "", 0, 1 };soundEscape[] ={ "", 0, 1 };sound[] ={ "", 0, 1 };};class IGUIBack{type = 0;idc = 124;style = 128;text = "";colorText[] ={0,0,0,0};font = "Zeppelin32";sizeEx = 0;shadow = 0;x = 0.1;y = 0.1;w = 0.1;h = 0.1;colorbackground[] ={"(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])","(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])"};}; -
For some reason I keep getting kicked when I try to connect after adding this. I get kicked for Battleye Scirpt restriction #22, here is the line that shows up in the script.log file.
#22 "mpmissions\__CUR_MP.Altis\init.sqf" if(hasInterface) then{ [] execVM "addons\paintshop\paintshop.sqf"; };"
If someone could help me with this I would appreciate it. My init.sqf only contains
if(hasInterface) then{ [] execVM "addons\paintshop\paintshop.sqf"; };
if that helps.
-
I've tried with your files and it works for admins only, my players don't even see the option. I use infistar and I have it setup as the install instructions say. Not sure if it has to do with the server_updateObject.sqf or not. I see on your files that it says v1.3 and I only have the server_updateObject.sqf for the one that I linked in my original post. I've tried to edit the files that I linked but I keep getting errors in my RPT log so I must be doing something wrong. The files just seem to have a lot of differences in them.i have it working on my server... wasnt too difficult to do...
VehicleKeyChanger_init.sqf
/***********************************/ /* Vehicle Key Changer v1.3 */ /* Written by OtterNas3 */ /* January, 11, 2014 */ /* Last update: 02/20/2014 */ /***********************************/ private ["_playerDollars","_itemsPlayer","_magazinesPlayer","_temp_Keys","_temp_keysDisplayName","_temp_keysDisplayNameParse","_key_colors","_ownerKeyId","_carKey","_hasKey","_cTarget","_keyName","_carKeyName","_targetVehicleKey","_temp_keysParse"]; ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Edit these settings to fit your needs/likes // ///////////////////////////////////////////////// ///////////////////////////////////////////////// /// Claim Vehicles that does not yet need Key /// ///////// 0 = Not allowed | 1 = Allowed ///////// vkc_claiming = 1; ///////////////////////////////////////////////// //////// Claim Vehicles costs this Item ///////// /// Any Item can be used here, some examples: /// //// ItemTinBar, ItemSilverBar, ItemGoldBar, //// ////// ItemSilverBar10oz, ItemGoldBar10oz, ////// ///// ItemBriefcase20oz, ItemBriefcase100oz ///// //////// set to "0" to disable the costs //////// vkc_claimingPrice = 5000; ///////////////////////////////////////////////// ////////// Change Key costs this Item// ///////// ////////////// see above examples /////////////// //////// set to "0" to disable the costs //////// vkc_Price = 5000; ///////////////////////////////////////////////// /////// Need KeyKit to use this function //////// ////////// 0 = Not needed | 1 = Needed ////////// vkc_needKeykit = 1; ///////////////////////////////////////////////// ///////////////////////////////////////////////// /////////////// DONT EDIT BELOW ! /////////////// ///////////////////////////////////////////////// /* Reset variables function */ ON_fnc_vkc_reset = { _cTarget = objNull; _itemsPlayer = []; _temp_keys = []; _carKey = objNull; _hasKey = false; _temp_keysDisplayName = []; _temp_keysDisplayNameParse = []; _temp_keysParse = []; _targetVehicleKey = objNull; _carKeyName = ""; player removeAction s_player_copyToKey; s_player_copyToKey = -1; }; //Added for Fix dayz_objectUID_vkc = { private["_position","_dir","_key","_object"]; _object = _this; _position = getPosATL _object; _dir = direction _object; _key = [_dir,_position] call dayz_objectUID2_vkc; _key }; dayz_objectUID2_vkc = { private["_position","_dir","_key"]; _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } forEach _position; _key = _key + str(round(_dir)); _key }; /* Wait for player full ingame so we can access the action-menu */ waitUntil {!isNil "dayz_animalCheck"}; s_player_copyToKey=-1; lastKeyChangeCursorTarget = [objNull,objNull,objNull,objNull,objNull]; /* Start the loop check */ while{true} do { sleep 3; _playerDollars = player getVariable['cashMoney', 0]; if (!isNull cursorTarget && speed player <= 1 && (vehicle player) == player && !isEngineOn cursorTarget && (cursorTarget isKindOf "Motorcycle" || cursorTarget isKindOf "Car" || cursorTarget isKindOf "Air" || cursorTarget isKindOf "Ship" || cursorTarget isKindOf "Truck" || cursorTarget isKindOf "Tank") && (cursorTarget distance player) <= 10 && cursorTarget getVariable ["VKC_disabled", 0] == 0 && cursorTarget getVariable ["VKC_claiming_disabled",0] == 0) then { _cTarget = cursorTarget; _itemsPlayer = items player; _magazinesPlayer = magazines player; if ((lastKeyChangeCursorTarget select 0) != _cTarget) then { if (s_player_copyToKey >= 0) then { player removeAction s_player_copyToKey; s_player_copyToKey = -1; }; }; lastKeyChangeCursorTarget set [0,_cTarget]; _carKey = _cTarget getVariable ["CharacterID","0"]; if (("ItemKeyKit" in _itemsPlayer || vkc_needKeykit == 0) && ((_carKey == "0" && vkc_claiming == 1 && (vkc_claimingPrice == 0 || vkc_claimingPrice < _playerDollars)) || _carKey != "0") && (vkc_Price == 0 || vkc_Price < _playerDollars)) then { if (_carKey == "0") then { _temp_keys = []; _temp_keysDisplayName = []; _temp_keysDisplayNameParse = []; _key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]; { if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in _key_colors) then { _ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _x >> "keyid"); _keyName = getText(configFile >> "CfgWeapons" >> _x >> "displayName"); _temp_keysDisplayName set [count _temp_keysDisplayName,_keyName]; _temp_keys set [count _temp_keys,str(_ownerKeyId)]; }; } forEach _itemsPlayer; if ((count _temp_keys) > 0) then { if (s_player_copyToKey < 0) then { lastKeyChangeCursorTarget set [0,_cTarget]; s_player_copyToKey = player addAction [("<t color=""#0000FF"">" + ("Claim Vehicle") + "</t>"),"custom\VehicleKeyChanger\VehicleKeyChanger.sqf",[_cTarget, _temp_keys, "0", _temp_keysDisplayName, "0", "0", vkc_Price, vkc_claimingPrice],-1,false,false,"",""]; }; } else { [] call ON_fnc_vkc_reset; }; } else { _temp_keys = []; _temp_keysDisplayName = []; _temp_keysDisplayNameParse = []; _temp_keysParse = []; _key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]; { if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in _key_colors) then { _ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _x >> "keyid"); _keyName = getText(configFile >> "CfgWeapons" >> _x >> "displayName"); _temp_keysDisplayName set [count _temp_keysDisplayName,_keyName]; _temp_keysDisplayNameParse set [_ownerKeyId,_keyName]; _temp_keys set [count _temp_keys,str(_ownerKeyId)]; _temp_keysParse set [_ownerKeyId, _x]; }; } forEach _itemsPlayer; _hasKey = _carKey in _temp_keys; if (_hasKey && (count _temp_keys) > 1) then { _carKeyName = (_temp_keysDisplayNameParse select (parseNumber _carKey)); _targetVehicleKey = (_temp_keysParse select (parseNumber _carKey)); _temp_keys = _temp_keys - [_carKey]; _temp_keysDisplayName = _temp_keysDisplayName - [_carKeyName]; if (s_player_copyToKey < 0) then { lastKeyChangeCursorTarget set [0,_cTarget]; s_player_copyToKey = player addAction [("<t color=""#0000FF"">" + ("Change Vehicle Key") + "</t>"),"custom\VehicleKeyChanger\VehicleKeyChanger.sqf",[_cTarget, _temp_keys, _carKey, _temp_keysDisplayName, _carKeyName, _targetVehicleKey, vkc_Price, 0],-1,false,false,"",""]; }; } else { [] call ON_fnc_vkc_reset; }; }; } else { [] call ON_fnc_vkc_reset; }; } else { lastKeyChangeCursorTarget = [objNull,objNull,objNull,objNull,objNull]; [] call ON_fnc_vkc_reset; }; };
VehicleKeyChanger.sqf
/***********************************/ /* Vehicle Key Changer v1.3 */ /* Written by OtterNas3 */ /* January, 11, 2014 */ /* Last update: 02/20/2014 */ /***********************************/ /* Setup the private variables */ private ["_magazinesPlayer","_max","_j","_actionArray","_targetVehicle","_targetVehicleID","_targetVehicleUID","_playerKeys","_playerKeysDisplayName","_targetVehicleKeyName","_itemKeyName","_targetVehicleClassname","_targetVehiclePos","_targetVehicleDir","_Price","_claimingPrice"]; /* Remove the Action Menu entry */ player removeAction s_player_copyToKey; s_player_copyToKey = 0; /* Get the array and setup the variables */ _actionArray = _this select 3; _targetVehicle = _actionArray select 0; _targetVehicleID = _targetVehicle getVariable ["ObjectID","0"]; _targetVehicleUID = _targetVehicle getVariable ["ObjectUID","0"]; /* Check if the Vehicle is in the Database, if false exit */ if (_targetVehicleID == "0" && _targetVehicleUID == "0") exitWith {s_player_copyToKey = -1;}; /* Setup more variables */ _playerKeys = _actionArray select 1; _playerKeysDisplayName = _actionArray select 3; _targetVehicleKeyName = _actionArray select 4; _itemKeyName = _actionArray select 5; _Price = _actionArray select 6; _claimingPrice = _actionArray select 7; _targetVehicleClassname = typeOf _targetVehicle; _targetVehiclePos = getPosATL _targetVehicle; _targetVehicleDir = getDir _targetVehicle; /* Setup the Key Names list to select from */ keyNameList = []; for "_i" from 0 to (count _playerKeysDisplayName) -1 do { keyNameList set [(count keyNameList), _playerKeysDisplayName select _i]; }; /* Setup the Key Numbers list to select from */ keyNumberList = []; for "_i" from 0 to (count _playerKeys) -1 do { keyNumberList set [(count keyNumberList), _playerKeys select _i]; }; /* Resetting menu variables*/ keyNameSelect = ""; exitscript = true; snext = false; /* Creating the menu */ copyMenu = { private ["_keyMenu","_keyArray"]; _keyMenu = [["",true], ["Change Vehicle to Key:", [-1], "", -5, [["expression", ""]], "1", "0"]]; for "_i" from (_this select 0) to (_this select 1) do { _keyArray = [format['%1', keyNameList select (_i)], [_i - (_this select 0) + 2], "", -5, [["expression", format ["keyNameSelect = keyNameList select %1; keyNumberSelect = keyNumberList select %1", _i]]], "1", "1"]; _keyMenu set [_i + 2, _keyArray]; }; _keyMenu set [(_this select 1) + 2, ["", [-1], "", -5, [["expression", ""]], "1", "0"]]; if (count keyNameList > (_this select 1)) then { _keyMenu set [(_this select 1) + 3, ["Next", [12], "", -5, [["expression", "snext = true;"]], "1", "1"]]; } else { _keyMenu set [(_this select 1) + 3, ["", [-1], "", -5, [["expression", ""]], "1", "0"]]; }; _keyMenu set [(_this select 1) + 4, ["Exit", [13], "", -5, [["expression", "keyNameSelect = 'exitscript';"]], "1", "1"]]; showCommandingMenu "#USER:_keyMenu"; }; /* Wait for the player to select a Key from the list */ _j = 0; _max = 10; if (_max > 9) then {_max = 10;}; while {keyNameSelect == ""} do { [_j, (_j + _max) min (count keyNameList)] call copyMenu; _j = _j + _max; waitUntil {keyNameSelect != "" || snext}; snext = false; }; /* Player selected a Key, lets make the Vehicle update call */ if (keyNameSelect != "exitscript") then { /* Check again for the needed TinBar or claiming price and remove em from the players inventory */ _magazinesPlayer = magazines player; _playerDollars = player getVariable['cashMoney', 0]; if (_Price > 0) then { if (_Price < _playerDollars) then { //[player, _Price, 1] call BIS_fnc_invRemove; player setVariable["cashMoney",_playerDollars - _Price, true]; systemChat (format["Keychange costs %1 Dollars, thanks for your Payment!", _Price]); } else { systemChat (format["Keychange costs %1 Dollars, you had it and tried to trick the system - Keychange for this Vehicle disabled!", Price]); _targetVehicle setVariable ["VKC_disabled", 1, true]; s_player_copyToKey = -1; breakOut "exit"; }; }; if (_claimingPrice > 0) then { if (_claimingPrice < _playerDollars) then { //[player, _claimingPrice, 1] call BIS_fnc_invRemove; player setVariable["cashMoney",_playerDollars - _claimingPrice, true]; systemChat (format["Claiming Vehicle costs %1 Dollars, thanks for your Payment!", _claimingPrice]); } else { systemChat (format["Claiming Vehicle costs %1 Dollars, you had it and tried to trick the system - Claiming for this Vehicle disabled!", Price]); _targetVehicle setVariable ["VKC_claiming_disabled", 1, true]; s_player_copyToKey = -1; breakOut "exit"; }; }; /* We got the Money lets do our Job */ /* Lock the vehicle */ _targetVehicle setVehicleLock "LOCKED"; /* The super duper OneForAllAnimation... */ player playActionNow "Medic"; /* Remove the Key from the Toolbelt of the player and put it in the Backpack - No Backpack and the Key gets lost */ if (_itemKeyName != "0") then { if (!isNull (unitBackpack player)) then { [player, _itemKeyName, 1] call BIS_fnc_invRemove; (unitBackpack (vehicle player)) addWeaponCargoGlobal [_itemKeyName, 1]; systemChat (format["%1 has been moved to your Backpack", _targetVehicleKeyName]); }; }; /* Giving unique UID for claimed vehicles */ if (_targetVehicleUID=="0") then { _targetVehicleUID = _targetVehicle call dayz_objectUID_vkc; _targetVehicle setVariable ["ObjectUID",_targetVehicleUID,true]; // It does probably nothing and it's not needed :) }; /* This calls the custom update function which we put it in server_updateObject.sqf */ PVDZE_veh_Update = [_targetVehicle, "vehiclekey", player, _targetVehicleClassname, keyNumberSelect, keyNameSelect, _targetVehicleID, _targetVehicleUID]; publicVariableServer "PVDZE_veh_Update"; /* Inform the player about the success and tell him to check the Key */ systemChat (format["Changed Vehicle Key to %1", keyNameSelect]); if (_targetVehicleKeyName != "0") then { systemChat (format["Please check Vehicle function with %1 before you throw away %2!", keyNameSelect, _targetVehicleKeyName]); }; }; /* Reset the action menu variable for a new run */ s_player_copyToKey = -1; /**************************************/ /* That's it, hope you enjoy this Mod */ /* */ /* Yours sincerly, */ /* Otter */ /**************************************/
This uses Souls Version so those money variables are set up for his not the 999 version,,,
-
Anyone get this working with Zupa's single currency (with soul's hive)?
-
That would be awesome, thanks.
-
I was wondering if anyone has vehicle key changer working with the coin system? I've seen many posts asking about it on the thread for it but seems like everyone ignores it over there.
Here is a link to the version I'm looking for to be a little more specific.
-
I know this was asked before but will this be updated to work with Plot For Life v2.34 with Snap Pro v1.4.1? I have these installed already along with other scripts that use these same files. So I was wondering if you might be updating this soon or if you still planned to release a guide on how to install this without other mods?
-
Yeah I can't the spoiler button on my computer but I was able to open it on my phone, But it's a pain in the butt to read.
edit
I found a way to open the spoiler tag.
right click on the spoiler button and goto inspect element then look for
div class="bbc_spoiler_wrapper"
and click the arrow before it, then right below that look for
style="display:none;"
and change the none to text and it will open the spoiler box
-
You had the code in the wrong place. I changed it for you, try this one.
https://www.dropbox.com/s/0v02ei1b3condri/fn_selfActions.sqf?dl=0
-
Has anyone been able to get this working fully? I'm still having trouble with the scroll option part of it. When ever I try to use it is says "You do not have the rights to manage." The rest of it works just fine and I can manage the door before they are opened.
If this helps, this is the error I get in the client side rpt log
Error in expression <"",""];
};
} else {
player removeAction s_player_manageDoor;
s_player_manageDoor>
Error position: <s_player_manageDoor;
s_player_manageDoor>
Error Undefined variable in expression: s_player_managedoor
File mpmissions\__CUR_MP.Panthera2\custom\fixes\fn_selfActions.sqf, line 564
-
Just remove one of the defines.hpp files you are using, that will solve that error.
-
I installed the 1.4.1 and everything seems to be working ok, but I do see this in the client logs.
Error in expression <ON_fnc_vkcReset = {
player removeAction s_player_claimVehicle;
s_player_claimVeh>
Error position: <s_player_claimVehicle;
s_player_claimVeh>
Error Undefined variable in expression: s_player_claimvehicle
File mpmissions\__CUR_MP.Chernarus\custom\VehicleKeyChanger\VehicleKeyChanger_init.sqf, line 41
I'm having this same problem but I'm running the original version that otter posted. I'm running overpoch 1.0.5.1, with the latest version of arma 2. except my rpt log says line 40 instead of line 41. Anyone able to help with this?
-
Yeah, I'm not very good at converting scripts either. Maybe Zupa or someone else could help with this.
-
I would look at the service stations script to help work on this. I believe that you will want to use SC_fnc_removeCoins instead of BIS_fnc_invRemove, because if I'm not mistaken BIS_fnc_invRemove will not work as the coins are not in your gear like the old currency was.
[RELEASE] Advanced Alchemical Crafting v3.3 UPDATED for 1.0.6.1
in A2: Epoch Mods
Posted
Anyone having issue where you get kicked for createvehicle restriction #0 when trying to build anything? No matter what I try to build I get kicked with that restriction. Never had this problem with 1.0.5.1. Also I'm running infiSTAR and I did add the required stuff to it like the instructions said.
Only solution I've come up with is to add everything to the createvehicle filter but that is a lot of filters to add.