Jump to content

LoOni3r

Member
  • Content Count

    64
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About LoOni3r

  • Rank
    Corporal

Recent Profile Visitors

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

  1. I solved it this way: { if (vehicleVarName _x != "") then { str typeOf _X remoteExec ["systemChat"]; str vehicleVarName _x remoteExec ["systemChat"]; str getPosATL _x remoteExec ["systemChat"]; str getDir _x remoteExec ["systemChat"]; str getAllHitPointsDamage _x remoteExec ["systemChat"]; }; } forEach vehicles; had hoped you can directly address the vehicle by vehiclevarname without scanning for all vehicle. Many Thanks for your answers.
  2. hi, Is there a way to determine the position of a vehicle by vehiclevarname? I work on a survival server and want to save the positions even if the vehicle is moved without a driver. Many Thanks.
  3. ok it works. thanks
  4. inidb2 is working on 32 and 64 bit. server ... _varValue params ["_player","_plconnect"]; if (_plconnect == 1) then { _pljoin = [name _player, " join the Game"] joinString ""; _pljoin remoteExec ["systemChat"]; }; _playeruid = getPlayerUID _player; _inidbifolderplayerdata = ["australia-survival\playerdata\",_playeruid] joinString ""; _inidbi = ["new", _inidbifolderplayerdata] call OO_INIDBI; _test = ["read", ["GENERAL", "POS"]] call _inidbi; _test remoteExec ["systemChat"]; playerData = [ ["read", ["GENERAL", "POS"]] call _inidbi, ["read", ["GENERAL", "DIR"]] call _inidbi ]; ... playerini applyPlayerData = { params ["_playerpos", "_playerdir"]; systemchat str[_playerpos]; _playerpos = parseSimpleArray _playerpos; player setPos _playerpos; _playerdir = parseNumber _playerdir; player setDir _playerdir; }; waitUntil {time > 0}; .... the second output of the position is missing. Now I've created a new blank mission with Altis. The same problem with Altis. missionNamespace does not seem to work on my server. I googled a lot and could not find a similar problem.
  5. player applyPlayerData = { params ["_playerpos", "_playerdir"]; _playerpos = parseSimpleArray _playerpos; player setPos _playerpos; _playerdir = parseNumber _playerdir; player setDir _playerdir; }; waitUntil {time > 0}; _plconnect = 1; playerDataRequest = [player,_plconnect]; if (isServer) then { ["playerDataRequest", playerDataRequest] call playerDataRequestHandler; } else { publicVariableServer "playerDataRequest"; playerDataRequest = nil; }; _time = time + 10; waitUntil {!(isNil "playerData") or {_time >= time}}; if (!(isNil "playerData")) then { playerData call applyPlayerData; playerData = nil; }; server playerDataRequestHandler = { params ["_varName", "_varValue"]; missionNamespace setVariable [_varName, nil]; _varValue params ["_player","_plconnect"]; if (_plconnect == 1) then { _pljoin = [name _player, " join the Game"] joinString ""; _pljoin remoteExec ["systemChat"]; }; _playeruid = getPlayerUID _player; _inidbifolderplayerdata = ["australia-survival\playerdata\",_playeruid] joinString ""; _inidbi = ["new", _inidbifolderplayerdata] call OO_INIDBI; playerData = [ ["read", ["GENERAL", "POS"]] call _inidbi, ["read", ["GENERAL", "DIR"]] call _inidbi ]; if (_player == player) then { playerData call applyPlayerData; } else { (owner _player) publicVariableClient "playerData"; }; playerData = nil; }; "playerDataRequest" addPublicVariableEventHandler {call playerDataRequestHandler}; That's the current status. I was already on. In Eden Editor -> Multiplayer there are no problems: applyPlayerData = { params ["_playerpos","_playerdir","_playermoney","_playerxp","_playernew"]; // New Player if (_playernew == 1) then { _veh = createVehicle ["C_Plane_Civil_01_F", [32790,327,150], [], 0, "FLY"]; player moveInDriver _veh; _wp = (group player) addWaypoint [[35708,11988], 0]; _wp setWaypointType "MOVE"; sleep 200; deleteWaypoint _wp; _wp2 = (group player) addWaypoint [[36615.738,12251.281], 0]; _wp2 setWaypointType "MOVE"; sleep 200; deleteWaypoint _wp2; hint "Welcome to LoOni3rs Survival.\n\nPlease press the Window Key."; }else{ // Not a New Player _playerpos = parseSimpleArray _playerpos; player setPos _playerpos; _playerdir = parseNumber _playerdir; player setDir _playerdir; hint "Welcome back."; }; // New Player ende }; waitUntil {time > 0}; _plconnect = 1; playerDataRequest = [player,_plconnect]; if (isServer) then { ["playerDataRequest", playerDataRequest] call playerDataRequestHandler; } else { publicVariableServer "playerDataRequest"; playerDataRequest = nil; }; _time = time + 10; waitUntil {!(isNil "playerData") or {_time >= time}}; if (!(isNil "playerData")) then { playerData call applyPlayerData; playerData = nil; }; Server: playerDataRequestHandler = { params ["_varName", "_varValue"]; missionNamespace setVariable [_varName, nil]; _varValue params ["_player","_plconnect"]; // Start if (_plconnect == 1) then { _pljoin = [name _player, " join the Game"] joinString ""; _pljoin remoteExec ["systemChat"]; }; _playeruid = getPlayerUID _player; _inidbifolderplayerdata = ["australia-survival\playerdata\",_playeruid] joinString ""; _inidbi = ["new", _inidbifolderplayerdata] call OO_INIDBI; // New Player _plpos = ["read", ["GENERAL", "POS"]] call _inidbi; str _plpos remoteExec ["systemChat"]; if (str _plpos == "false") then { _playerpos = getPosATL _player; _setplayerpos = ['',_playerpos,''] joinString ""; _playerdir = getDir _player; _setplayerdir = ['',_playerdir,''] joinString ""; _setplayerpos = ["write", ["GENERAL", "POS", _setplayerpos]] call _inidbi; _setplayerdir = ["write", ["GENERAL", "DIR", _setplayerdir]] call _inidbi; _setplayerpos = ["write", ["GENERAL", "MONEY", "1000"]] call _inidbi; _setplayerdir = ["write", ["GENERAL", "XP", "0"]] call _inidbi; _setplayerdir = ["write", ["GENERAL", "NEW", "1"]] call _inidbi; }; // New Player ende playerData = [ ["read", ["GENERAL", "POS"]] call _inidbi, ["read", ["GENERAL", "DIR"]] call _inidbi, ["read", ["GENERAL", "MONEY"]] call _inidbi, ["read", ["GENERAL", "XP"]] call _inidbi, ["read", ["GENERAL", "NEW"]] call _inidbi ]; _setplayerdir = ["write", ["GENERAL", "NEW", "0"]] call _inidbi; // Ende if (_player == player) then { playerData call applyPlayerData; } else { (owner _player) publicVariableClient "playerData"; }; playerData = nil; }; "playerDataRequest" addPublicVariableEventHandler {call playerDataRequestHandler}; to test I deleted everything last night and "missionNamespace setVariable ["YourString",3];" in iniserver and "_yourString = missionNamespace getVariable "YourString"; hint str[_yourString ];" inserted to test whether something is ever sent from server to client. That was not the case. My server does not send any data to the client and I do not understand it
  6. thank you for the code. the server does not send me the data to the client eden editor -> multiplayer it works. I've deleted ale scripts for testing. except that the system chat is no longer displayed, nothing has changed. So it can only be on the server. here's my config: start.bat: @echo off start arma3server_x64.exe -port=2302 "-config=config.cfg" "-profiles=profile" -name=server -filePatching "-servermod=mods\@inidbi2;" "-mod=mods\@Australia 5.0.9;" -autoInit timeout 3 config: hostName = "test server - not join!"; password = ""; passwordAdmin = "pass"; serverCommandPassword = ""; logFile = ""; persistent = 1; class Missions { class Mission_1 { template = "looni3r-survival.australia"; difficulty = "regular"; }; }; description.ext: author = "LoOni3r (Dennis)"; onLoadName = "LoOni3r´s Survival"; onLoadMission = "Survival Game of Arma 3 - Please Wait, loading..."; loadScreen = "loadscreen.jpg"; skipLobby = 1; briefing = 0; debriefing = 0; enableDebugConsole = 1; respawn = "BASE"; respawnDelay = 2; respawnDialog = 0; disabledAI=1; class Header { gameType = Survive; minPlayers = 1; maxPlayers = 32; };
  7. initPlayerLocal.sqf: applyPlayerData = { }; waitUntil {time > 0}; playerDataRequest = [player]; if (isServer) then { ["playerDataRequest", playerDataRequest] call playerDataRequestHandler; } else { publicVariableServer "playerDataRequest"; playerDataRequest = nil; }; _time = time + 10; waitUntil {!(isNil "playerData") or {_time >= time}}; if (!(isNil "playerData")) then { playerData call applyPlayerData; playerData = nil; }; initServer.sqf: playerDataRequestHandler = { params ["_varName", "_varValue"]; missionNamespace setVariable [_varName, nil]; _varValue params ["_player"]; // Start _pljoin = [name _player, " join the Game"] joinString ""; _pljoin remoteExec ["systemChat"]; _playeruid = getPlayerUID _player; _inidbifolderplayerdata = ["australia-survival\playerdata\",_playeruid] joinString ""; _inidbi = ["new", _inidbifolderplayerdata] call OO_INIDBI; _playerpos = ["read", ["GENERAL", "POS"]] call _inidbi; _setplayerpos = [_playeruid,"pos"] joinString ""; // missionNamespace setVariable [_setplayerpos,_playerpos]; _playerdir = ["read", ["GENERAL", "DIR"]] call _inidbi; _setplayerdir = [_playeruid,"dir"] joinString ""; // missionNamespace setVariable [_setplayerdir,_playerdir]; // Ende if (_player == player) then { playerData call applyPlayerData; } else { (owner _player) publicVariableClient "playerData"; }; playerData = nil; }; "playerDataRequest" addPublicVariableEventHandler {call playerDataRequestHandler}; how do I get _setplayerpos and _setplayerdir in the initPlayerLocal.sqf read? I tried a lot, example: _playerpos = ["playerDataRequest", _playerpos] call playerDataRequestHandler; hint str[_playerpos]; looks logical to me, but did not work
  8. ok, if missionNamespace server and client are disconnected, it's clear that it's not working. my test server I have local hosted on my PC. can I allow the server missionNamespace without publicVariable?
  9. can someone do something with it?
  10. "-serverMod=@inidbi2" I have, that works too missionNamespace about eden editor -> multiplayer it works. it does not work over server. I wrote the following for the first test (I know it is not optimal but for testing it is enough for now): initPlayerLocal: _playeruid = getPlayerUID player; _setplayerconnected = [_playeruid,"connected"] joinString ""; missionNamespace setVariable [_setplayerconnected,1]; sleep 10; _playerpos = [_playeruid,"pos"] joinString ""; _playerpos = missionNamespace getVariable _playerpos; _playerpos = parseSimpleArray _playerpos; _playerpos deleteAt 2; _playerpos pushback 0; player setPos _playerpos; _playerdir = [_playeruid,"dir"] joinString ""; _playerdir = missionNamespace getVariable _playerdir; _playerdir = parseNumber _playerdir; player setDir _playerdir; initServer: while {true} do{ // Player Data { _playeruid = getPlayerUID _x; _inidbifolderplayerdata = ["australia-survival\playerdata\",_playeruid] joinString ""; _inidbi = ["new", _inidbifolderplayerdata] call OO_INIDBI; _playerconnected = [_playeruid,"connected"] joinString ""; _playerconnected = missionNamespace getVariable _playerconnected; if (_playerconnected == 1) then { "1" remoteExec ["systemChat"]; _playerpos = ["read", ["GENERAL", "POS"]] call _inidbi; _setplayerpos = [_playeruid,"pos"] joinString ""; missionNamespace setVariable [_setplayerpos,_playerpos]; _playerdir = ["read", ["GENERAL", "DIR"]] call _inidbi; _setplayerdir = [_playeruid,"dir"] joinString ""; missionNamespace setVariable [_setplayerdir,_playerdir]; _setplayerconnected = [_playeruid,"connected"] joinString ""; missionNamespace setVariable [_setplayerconnected,0]; sleep 30; }else{ // Player Connect _playerpos = getPosASL _x; _setplayerpos = ['',_playerpos,''] joinString ""; _playerdir = getDir _x; _setplayerdir = ['',_playerdir,''] joinString ""; _playerloadout = getUnitLoadout _x; // _time = "getTimeStamp" call _inidbi; // <- not working // _setplayerdate = ["write", ["GENERAL", "TIME", _time]] call _inidbi; _setplayerpos = ["write", ["GENERAL", "POS", _setplayerpos]] call _inidbi; _setplayerdir = ["write", ["GENERAL", "DIR", _setplayerdir]] call _inidbi; // _setplayerloadout = ["write", ["GENERAL", "LOADOUT", _setplayerloadout]] call _inidbi; _setplayerloadout = [_playeruid,"loadout"] joinString ""; missionNamespace setVariable [_setplayerloadout,_playerloadout]; "2" remoteExec ["systemChat"]; }; // Player Connect ende }foreach playableUnits; // Player Data ende sleep 3; };
  11. saving loadout works. just do not retrieve that. It can wait. missionNamespace does not work on my test server. do you have to add a start parameter or something else? edit: I looked at your example and tried to take over. Unfortunately, I still do not understand how data from server to client sends
  12. with the default settings, so completely without parameters, the game does not crash. But I need Arma 3 to 64 bits otherwise I have too little FPS
  13. My game closes when I fly To-199 Neophron in Gamemode Warlords. I was told it could be due to the parameter. I have gradually deserted everything and do not know why it is. My System: Windows 10 Pro x64 i7-8700k 64GB DDR4 GTX-1080 AMP Extrem I hope someone can help me.
  14. How do you save the loadout? he does not read the loadout with me. save works. { _playerloadout = getUnitLoadout _x; _setplayerloadout = ['',_playerloadout,''] joinString ""; _read = ["read", ["GENERAL", "LOADOUT"]] call _inidbi; _read remoteExec ["systemChat"]; }foreach playableUnits; Database: [GENERAL] LOADOUT=""[[],[],[],["U_C_man_sport_2_F",[["FirstAidKit",1],["Chemlight_red",1,1],["Chemlight_blue",1,1],["SmokeShellRed",1,1],["SmokeShellYellow",1,1]]],[],[],"","",[],["","","","","",""]]"" no output.
×