FragZ Posted October 30, 2014 Report Share Posted October 30, 2014 I tried using editor (that was dumb) which made us blow up upon entry. I tried using judge bread's method and it did not work for me, and made server lag: I am lost right now. I want vehicles that respawns at a certain location every restart (survival city). any help? Link to comment Share on other sites More sharing options...
0 Shak Posted October 30, 2014 Report Share Posted October 30, 2014 This code will spawn 2 vehicles at the nwaf, edit it to your liking and BOOM vehicles spawn in the same position each restart. Vroom vroom. if (isServer) then { private ["_object","_uniqueid"]; _vehicle_9998 = objNull; if (true) then { _this = createVehicle ["MH6J_DZ", [4828.4443, 9768.4717], [], 0, "CAN_COLLIDE"]; _vehicle_9998 = _this; _this setDir -210.79807; _this setPos [4828.4443, 9768.4717]; _object setVariable ["MalSar",1,true]; _uniqueid = str(round(random 999999)); _object setVariable ["ObjectID", _uniqueid, true]; _object setVariable ["ObjectUID", _uniqueid, true]; }; _vehicle_9999 = objNull; if (true) then { _this = createVehicle ["SUV_TK_CIV_EP1", [4819.5127, 9761.2656, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_9999 = _this; _this setDir -208.42464; _this setPos [4819.5127, 9761.2656, 3.0517578e-005]; _object setVariable ["MalSar",1,true]; _uniqueid = str(round(random 999999)); _object setVariable ["ObjectID", _uniqueid, true]; _object setVariable ["ObjectUID", _uniqueid, true]; }; }; Link to comment Share on other sites More sharing options...
0 FragZ Posted October 30, 2014 Author Report Share Posted October 30, 2014 This code will spawn 2 vehicles at the nwaf, edit it to your liking and BOOM vehicles spawn in the same position each restart. Vroom vroom. if (isServer) then { private ["_object","_uniqueid"]; _vehicle_9998 = objNull; if (true) then { _this = createVehicle ["MH6J_DZ", [4828.4443, 9768.4717], [], 0, "CAN_COLLIDE"]; _vehicle_9998 = _this; _this setDir -210.79807; _this setPos [4828.4443, 9768.4717]; _object setVariable ["MalSar",1,true]; _uniqueid = str(round(random 999999)); _object setVariable ["ObjectID", _uniqueid, true]; _object setVariable ["ObjectUID", _uniqueid, true]; }; _vehicle_9999 = objNull; if (true) then { _this = createVehicle ["SUV_TK_CIV_EP1", [4819.5127, 9761.2656, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_9999 = _this; _this setDir -208.42464; _this setPos [4819.5127, 9761.2656, 3.0517578e-005]; _object setVariable ["MalSar",1,true]; _uniqueid = str(round(random 999999)); _object setVariable ["ObjectID", _uniqueid, true]; _object setVariable ["ObjectUID", _uniqueid, true]; }; }; Tyvm kind sir. Will give feed back! Link to comment Share on other sites More sharing options...
0 FragZ Posted October 31, 2014 Author Report Share Posted October 31, 2014 This code will spawn 2 vehicles at the nwaf, edit it to your liking and BOOM vehicles spawn in the same position each restart. Vroom vroom. if (isServer) then { private ["_object","_uniqueid"]; _vehicle_9998 = objNull; if (true) then { _this = createVehicle ["MH6J_DZ", [4828.4443, 9768.4717], [], 0, "CAN_COLLIDE"]; _vehicle_9998 = _this; _this setDir -210.79807; _this setPos [4828.4443, 9768.4717]; _object setVariable ["MalSar",1,true]; _uniqueid = str(round(random 999999)); _object setVariable ["ObjectID", _uniqueid, true]; _object setVariable ["ObjectUID", _uniqueid, true]; }; _vehicle_9999 = objNull; if (true) then { _this = createVehicle ["SUV_TK_CIV_EP1", [4819.5127, 9761.2656, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_9999 = _this; _this setDir -208.42464; _this setPos [4819.5127, 9761.2656, 3.0517578e-005]; _object setVariable ["MalSar",1,true]; _uniqueid = str(round(random 999999)); _object setVariable ["ObjectID", _uniqueid, true]; _object setVariable ["ObjectUID", _uniqueid, true]; }; }; With this method I can drive fine for like 1 minute, then you die from it... just like the rest But like delayed. Help!@ Link to comment Share on other sites More sharing options...
0 CordIAsis Posted October 31, 2014 Report Share Posted October 31, 2014 The best and most obvious way to make vehicles safe is by adding them to the PVDZE_serverObjectMonitor array, also the _object variable is nothing. At no point in that code does it get assigned any value whatsoever. Try using this - if (isServer) then { _vehicle_9998 = objNull; if (true) then { _this = createVehicle ["MH6J_DZ", [4828.4443, 9768.4717], [], 0, "CAN_COLLIDE"]; _vehicle_9998 = _this; _this setDir -210.79807; _this setPos [4828.4443, 9768.4717]; _this setVariable ["ObjectID",str(round(random 999999)), true]; _this setVariable ["ObjectUID",str(round(random 999999)), true]; if (!isNil "PVDZE_serverObjectMonitor") then {PVDZE_serverObjectMonitor set [(count PVDZE_serverObjectMonitor),_this];}; }; _vehicle_9999 = objNull; if (true) then { _this = createVehicle ["SUV_TK_CIV_EP1", [4819.5127, 9761.2656, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_9999 = _this; _this setDir -208.42464; _this setPos [4819.5127, 9761.2656, 3.0517578e-005]; _this setVariable ["ObjectID",str(round(random 999999)), true]; _this setVariable ["ObjectUID",str(round(random 999999)), true]; if (!isNil "PVDZE_serverObjectMonitor") then {PVDZE_serverObjectMonitor set [(count PVDZE_serverObjectMonitor),_this];}; }; }; Link to comment Share on other sites More sharing options...
0 Shak Posted October 31, 2014 Report Share Posted October 31, 2014 With this method I can drive fine for like 1 minute, then you die from it... just like the rest But like delayed. Help!@ That's odd. Works on our server. Do you have an AH? Link to comment Share on other sites More sharing options...
0 FragZ Posted November 3, 2014 Author Report Share Posted November 3, 2014 That's odd. Works on our server. Do you have an AH? I do have InfiSTAR antihack and my own one (which only checks for activated variables and some other stuff I don't want to talk too much about hahaha!) Link to comment Share on other sites More sharing options...
0 Bob_the_K Posted November 26, 2014 Report Share Posted November 26, 2014 So I'm working on spawning in an Origins submarine but don't want it to spawn in the same spot every time. Is there a way I can set, say, four locations around the shore where a new one will spawn in randomly after reset when the current one gets destroyed? Link to comment Share on other sites More sharing options...
0 deadlokd Posted November 26, 2014 Report Share Posted November 26, 2014 the vehicle blowing up there is a fix i believe on Opendayz.. and if im not mistaken it has to do with your server cleanup.fsm... i could be wrong.. but there is a fix for vehicles that go BOOM .... let me know if you need further assistance.. Link to comment Share on other sites More sharing options...
0 oSoDirty Posted November 26, 2014 Report Share Posted November 26, 2014 if (isServer) then { _vehicle_9998 = objNull; if (true) then { _pos1 = [0.0.0]; _pos2 = [0.0.0]; _pos3 = [0.0.0]; _pos4 = [0.0.0]; _pos5 = [0.0.0]; _pos6 = [0.0.0]; _position = [_pos1, _pos2, _pos3, _pos4, _pos5, _pos6] call BIS_fnc_selectRandon; _this = createVehicle ["MH6J_DZ", [_position], [], 0, "CAN_COLLIDE"]; _vehicle_9998 = _this; _this setDir -210.79807; _this setPos [_position]; _this setVariable ["ObjectID",str(round(random 999999)), true]; _this setVariable ["ObjectUID",str(round(random 999999)), true]; if (!isNil "PVDZE_serverObjectMonitor") then {PVDZE_serverObjectMonitor set [(count PVDZE_serverObjectMonitor),_this];}; }; _vehicle_9999 = objNull; if (true) then { _pos1 = [0.0.0]; _pos2 = [0.0.0]; _pos3 = [0.0.0]; _pos4 = [0.0.0]; _pos5 = [0.0.0]; _pos6 = [0.0.0]; _position = [_pos1, _pos2, _pos3, _pos4, _pos5, _pos6] call BIS_fnc_selectRandon; _this = createVehicle ["SUV_TK_CIV_EP1", [_position], [], 0, "CAN_COLLIDE"]; _vehicle_9999 = _this; _this setDir -208.42464; _this setPos [_position]; _this setVariable ["ObjectID",str(round(random 999999)), true]; _this setVariable ["ObjectUID",str(round(random 999999)), true]; if (!isNil "PVDZE_serverObjectMonitor") then {PVDZE_serverObjectMonitor set [(count PVDZE_serverObjectMonitor),_this];}; }; }; Keep it interesting, Move them around a bit. Just fill in the coords in the "[0.0.0]" _sideeffect1 = insanity; _sideeffect2 = drug_abuse; _sideeffect3 = violence; _boring = [_sideeffect1, _sideeffect2, _sideeffect3] call BIS_fnc_selectRandom; _predictability = _boring Link to comment Share on other sites More sharing options...
0 Bob_the_K Posted November 26, 2014 Report Share Posted November 26, 2014 Now this is interesting... I took a look at my PVDZE_serverObjectMonitor array in variables.sqf and there's nothing in it! Given that, what is the function of that array (beyond the obvious of monitoring server objects). Should I have expected to see anything in the array? Link to comment Share on other sites More sharing options...
0 CordIAsis Posted November 26, 2014 Report Share Posted November 26, 2014 When the array is created it starts empty, vehicles and objects get added to it as they are loaded in or spawned through trading/construction. In regards to it's function, you answered it yourself. Link to comment Share on other sites More sharing options...
0 calamity Posted November 27, 2014 Report Share Posted November 27, 2014 I believe this is how I was able to spawn editor placed vehicles without them killing me or dissapearing... watch the end of this video 21:35 raymix has some very helpful video's........ Link to comment Share on other sites More sharing options...
Question
FragZ
I tried using editor (that was dumb) which made us blow up upon entry.
I tried using judge bread's method and it did not work for me, and made server lag:
I am lost right now. I want vehicles that respawns at a certain location every restart (survival city).
any help?
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now