Jump to content

pliskin124

Member
  • Content Count

    149
  • Joined

  • Last visited

  • Medals

Community Reputation

4 Neutral

1 Follower

About pliskin124

  • Rank
    Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. pliskin124

    Disabling Escape Button Options

    Figured it out. Full script for anyone interested in a friendly fire script. Credit to pierremgi for assisting in DM's! Create a ME Guard House from CUP with the jail cell, name it Jail 1, create an invisible helper object in the cell name it Cell1 Trigger Condition: (rating player) < -1000 On Activation: nul = ExecVM "FriendlyFire.sqf"; titleText ["Court Martial!","BLACK OUT",3]; player setPos (getPos Cell1); player setVariable ["inJail", true]; [] spawn { waitUntil {!isNull findDisplay 46}; findDisplay 46 displayAddEventHandler ["keyDown",{ params ["_ctrl","_key"]; if (!(player getVariable ["inJail",TRUE])) then {findDisplay 46 displayRemoveEventHandler ["keyDown",_thisEventHandler]}; private _h = false; if (_key == 1) then {_h = true}; _h }] }; Jail1 animate ["door_2_rot",0]; removeAllWeapons player; removeAllItems player; removeAllAssignedItems player; removeVest player; removeBackpack player; removeHeadgear player; removeGoggles player; removeUniform player; player forceAddUniform "U_C_WorkerCoveralls"; titleText ["You must serve 2 minutes in jail","BLACK IN",4]; sleep 120; player setVariable ["inJail", false]; titleText ["Jail Time Served","WHITE IN",4]; Jail1 animate ["door_2_rot",1]; player addRating 2000;
  2. pliskin124

    Disabling Escape Button Options

    Yeah I came across one of your old posts in the past but it didn't seem to work. The one above seems to be working I just can't for the life of me figure out how to re-enable the escape key
  3. pliskin124

    Disabling Escape Button Options

    0 = [] spawn { waitUntil {!isNull findDisplay 46}; findDisplay 46 displayAddEventHandler ["keyDown",{ params ["_ctrl","_key"]; private _h = false; if (_key == 156) then {_h = true}; _h }] }; Managed to dig around and find a solution for disabling the key... However I need to re-enable the escape key once the timer is up. Suggestions?
  4. Thanks for reading my thread! I am trying to create a script that will disable a players Escape button options while they are serving jail time for friendly fire, then re-enable it once the cell door opens. This is to prevent them just respawning and circumventing their punishment. I have searched through the forums and cannot find an option that actually works. I do not want to disable all of the players input so they can look out the window and communicate with others should they wish to see them. Here is the current script which teleports the player to the jail cell and makes them sit for 5 minutes following their killing of a friendly unit: playMusic "gameIntro"; titleText ["Court Martial!","BLACK OUT",3]; player setPos (getPos Cell1); Jail1 animate ["door_2_rot",0]; removeAllWeapons player; removeAllItems player; removeAllAssignedItems player; removeVest player; removeBackpack player; removeHeadgear player; removeGoggles player; removeUniform player; player forceAddUniform "U_C_WorkerCoveralls"; titleText ["You must serve 5 minutes in jail","BLACK IN",4]; sleep 300; enableSerialization; if (!alive player) then {((findDisplay 49) displayctrl 104) ctrlShow true;}; titleText ["Jail Time Served","WHITE IN",4]; Jail1 animate ["door_2_rot",1]; player addRating 2000; Any assistance would be appreciated.
  5. inidbi2 has been writing / reading successfully from the database when the game is launched locally, however when I place it onto the Dedicated server (running on windows 10) it will not create the databases. My question is, does it require a windows server OS, or am I missing some crucial step here regarding the DLL? I have launched the server with -filepatching and attempted to authorize the rule on DLL. The readme reads: However I am not seeing any way to authorize it in Windows 10 and I am wondering if this only applies to servers. Thanks for any assistance. The following link is the mission file if anyone has any thoughts: GearPersistence.VR
  6. pliskin124

    Shock's Redressing Script

    Does anyone still have an archived version of this since Armaholic went down?
  7. Unfortunately it appears I was mistaken. After testing this live on the dedicated server the AI still sit there and do nothing when transferred to the headless... Works fine on the editor without a headless client, still can't figure out how to issue the command to the headless controlled units. Any help would be appreciated
  8. The code above seems to just throw errors. The database is now coming in as: [_uid] Name=""Nomad"" Gear="[["arifle_MX_ACO_pointer_F","","acc_pointer_IR","optic_Aco",["30Rnd_65x39_caseless_mag",30],[],""],[],["hgun_P07_F","","","",["16Rnd_9x21_Mag",17],[],""],["U_B_CombatUniform_mcam_tshirt",[["ACE_fieldDressing",1],["ACE_packingBandage",1],["ACE_morphine",1],["ACE_tourniquet",1],["30Rnd_65x39_caseless_mag",2,30]]],["V_Chestrig_rgr",[["30Rnd_65x39_caseless_mag",5,30],["16Rnd_9x21_Mag",2,17],["HandGrenade",2,1],["B_IR_Grenade",2,1],["SmokeShell",1,1],["SmokeShellGreen",1,1],["Chemlight_green",2,1]]],["B_Carryall_mcamo_AAT",[["Titan_AT",2,1],["Titan_AP",2,1]]],"H_HelmetB_light","",["Rangefinder","","","",[],[],""],["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]]" [Player Info] Position="[1198.34,3403.18,0.00143909]" and it just repeats the error messages from the systemChat You said it was working on your end, would you be able to provide the full scripts so I can test it?
  9. Thanks for the update, I'll test that out tomorrow. My brain is entirely fried today to look at code
  10. Trying this alternative method... getting a new error code. _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _gear = getUnitLoadout player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _gear, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _loadDataValue = _this select 1; //take the whole value and store it in a variable, value is [_gear, _location] _gear = _loadDataValue select 0; //select the first element of the array to get gear, alternatively could use ((_this select 1) select 0) _coordinates = ["read", ["Player Location", "Location", []]]] call _inidbi; //select second element, alternatively could use ((_this select 1) select 1) player setUnitLoadout _gear; player setPosATL _coordinates; }; My thought here is to define the variable _coordinates as reading the database file, then call that as the setPosATL but now I'm getting the following error code: "["Player Location", "Location", []]]] call_inidbi; player setUnitLoadout _... Error Missing ; Init.sqf - Line 12 Fixed, forgot to remove the extra ] Unfortunately it's not posting any errors, but it's also not doing anything either... which leaves me at a loss.
  11. Just fiddling around with the code a bit, changed the init.sqf to: "loadData" addPublicVariableEventHandler { _loadDataValue = _this select 1; //take the whole value and store it in a variable, value is [_gear, _location] _gear = _loadDataValue select 0; //select the first element of the array to get gear, alternatively could use ((_this select 1) select 0) _location = _loadDataValue select 1; //select second element, alternatively could use ((_this select 1) select 1) player setUnitLoadout _gear; player setPosATL ["read", ["Player Location", "Location", [1195.34,3407.94,30.00143909]]] call _inidbi; }; No major change, but I did manage to get the error code to change from 2 elements to 3 elements provided... Clearly the code is expecting something I'm just not sure what. player setPosATL ["read", [Player Location", "..." Error 2 elements provided, 3 expected
  12. To be honest I'm not sure how to make a github, but this is the test mission I'm testing the framework off of if you want to fiddle with it and see if you can get it to work: https://mab.to/Y1W8HAPis (myairbridge link to a .rar file) If I can get this working I'll gladly share the main mission I'm developing it for with you, it's a multi-session operation type mission with some dynamic missions, headless client support, dynamic enemy occupation etc. The addon for the database is here: You just put the @inidbi2 folder in the Arma 3 directory and copy the key in there to the keys folder should start working
  13. I added this to the getData.sqf _location = ["read", ["Player Location", "Location", [1195.34,3407.94,30.00143909]]] call _inidbi; but I'm still getting the following error "player setUnitLoadout _gear; player setPosATL _location; }; File: Init.sqf Line 14 Error 1 elements provided, 3 expected This is so frustrating, I sincerely appreciate you taking the time to stick with me on this, I'm sure you have better things to do. Updated SQF's for reference: init.sqf _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _gear = getUnitLoadout player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _gear, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _loadDataValue = _this select 1; //take the whole value and store it in a variable, value is [_gear, _location] _gear = _loadDataValue select 0; //select the first element of the array to get gear, alternatively could use ((_this select 1) select 0) _location = _loadDataValue select 1; //select second element, alternatively could use ((_this select 1) select 1) player setUnitLoadout _gear; player setPosATL _location; }; getData.sqf private _myArray = ["x","y","z"]; _UID = (_this select 0); _clientID = (_this select 1); _inidbi = ["new", _UID] call OO_INIDBI; _gear = ["read", ["Player Gear", "Gear", []]] call _inidbi; _location = ["read", ["Player Location", "Location", [1195.34,3407.94,30.00143909]]] call _inidbi; loadData = [_gear, _location]; _clientID publicVariableClient "loadData"; createDatabase.sqf private _myArray = ["x","y","z"]; _clientID = (_this select 0); _UID = (_this select 1); _playerName = (_this select 2); _gear = (_this select 3); _location = (_this select 4); _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Info", "Name", _playerName]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; ["write", ["Player Location", "Location", _location,[_myArray]]] call _inidbi; initServer.sqf "checkForDatabase" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _clientID = (_data select 0); _UID = (_data select 1); _playerName = (_data select 2); _gear = (_data select 3); _location = [_data select 4]; _inidbi = ["new", _UID] call OO_INIDBI; _fileExist = "exists" call _inidbi; if (_fileExist) then { hint "FILE DOES EXIST, GETTING DATA"; null = [_UID, _clientID, _location] execVM "getData.sqf"; } else { hint "FILE DOES NOT EXIST, CREATING DATABASE"; null = [_clientID, _UID, _playerName, _gear, _location] execVM "createDatabase.sqf"; }; }; "saveData" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _UID = (_data select 0); _gear = (_data select 1); _location = [_data select 1]; _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Location", "Location", _location]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; hint "data saved"; };
  14. I've defined a new array in the createDatabase.sqf file... which seems to take and populate the data onto the database, however I'm lost on how to call it correctly. createDatabase.sqf private _myArray = ["x","y","z"]; _clientID = (_this select 0); _UID = (_this select 1); _playerName = (_this select 2); _gear = (_this select 3); _location = (_this select 4); _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Info", "Name", _playerName]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; ["write", ["Player Location", "Location", _location,[_myArray]]] call _inidbi; I tried changing the load data parameters to select each part of the array separately, not sure I'm doing it right init.sqf _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _gear = getUnitLoadout player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _gear, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _loadData = _this select 1; //take the whole value and store it in a variable, value is [_gear, _location] _gear = _loadData select 0; //select the first element of the array to get gear, alternatively could use ((_this select 1) select 0) _location = _loadData select 1; //select second element, alternatively could use ((_this select 1) select 1) player setUnitLoadout _gear; player setPosATL (_location select 0, _location select 1, _location select 2); }; I keep receiving the error code "player setPosATL (_location select 0, _location select 1, _location select 2); Error Missing ) init.sqf - Line 14
  15. Since I'm using inidbi2, I found the parameters for the read sequence... Wondering if anyone can help me make sense of this. Function: read Usage : ["read", [_section, _key]] call _inidbi; Param: array string _section - name of sectrion containing the key string _key - name of key to read Output: value of key, if nothing is found return by default: false; You can set the default return value as follow (instead of false) ex: Usage : ["read", ["section", "key", "mydefaultvalueifnothingisfound"]] call _inidbi; Usage : ["read", ["section", "key", 0]] call _inidbi; Usage : ["read", ["section", "key", true]] call _inidbi; Usage : ["read", ["section", "key", ["mydefaultarray"]]] call _inidbi; Of particular interest is the ["mydefaultarray"]]] I think may help?
×