Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
logitrust

Respawn marker with player (dedicated server.)

Recommended Posts

Any ide getting this to work on dedicated server? Not player(client side).

while {true} do {

waitUntil {!alive player};

_weapons = weapons player;

_magazines = magazines player;

waitUntil {alive player};

_p = player;

{_p addMagazine _x} forEach _magazines;

{_p addWeapon _x} forEach _weapons;

_primw = primaryWeapon _p;

if (_primw != "") then {

_p selectWeapon _primw;

// Fix for weapons with grenade launcher

_muzzles = getArray(configFile>>"cfgWeapons" >> _primw >> "muzzles");

_p selectWeapon (_muzzles select 0);

};

[player] execVM "do_Marker.sqf";

};

Have isues that players on my server wont spawn with gear,ammo,weapon etc. Think this can have somthing to do that this script is for local only.

Read more about my problem here:

http://forums.bistudio.com/showpost.php?p=1763993&postcount=17

thank you for your attention -

Share this post


Link to post
Share on other sites

Somone know about another respawn script i can use then? tryd to modify this one, but no luck. Have to be suported to MP

---------- Post added at 02:50 PM ---------- Previous post was at 12:57 PM ----------

okei. to make it more simple. Somone know how to i make a script to the init.sqf who calls the the player's marker script = do_markers.sqf. Thats all i need to know. Right now i have done this like this:

init.sqf:

execVM "weaponrespawn.sqf";

weaponrespawn.sqf:

while {true} do {

waitUntil {!alive player};

_weapons = weapons player;

_magazines = magazines player;

_deadbody = player;

waitUntil {alive player};

_p = player;

removeAllItems _p;

removeAllWeapons _p;

hideBody _deadbody;

{_p addMagazine _x} forEach _magazines;

{_p addWeapon _x} forEach _weapons;

_primw = primaryWeapon _p;

if (_primw != "") then {

_p selectWeapon _primw;

// Fix for weapons with grenade launcher

_muzzles = getArray(configFile>>"cfgWeapons" >> _primw >> "muzzles");

_p selectWeapon (_muzzles select 0);

};

[player] execVM "do_Marker.sqf";

};

And yes, i want to know how i can give back the players the markers they started with after they have died, and spawnd back.

who look like this:

do_markers.sqf

//////////////////////////////////////////////////////////////////

// Function file for Armed Assault //

// Created by: Logitrust/twirly - Enchanced by kylania //

//////////////////////////////////////////////////////////////////

// Call by:

// poop = [object] execVM "do_marker.sqf";

private ["_markerType","_unit","_markerName","_markerText","_markerColor"];

// Grab unit object

_unit = _this select 0; //

// Create marker values

_markerName = "marker" + str(_unit); //

_markerText = if (isPlayer _unit) then {toUpper name _unit} else {""};

_markerType = ""; // "Man"

_markerColor = ""; // "ColorOrange"

// Assign marker type and color

if (_unit isKindOf "Man") then {_markerType = "Man"; _markerColor = "ColorOrange"};

if (_unit isKindOf "Tank") then {_markerType = "Tank"; _markerColor = "ColorGreen"};

if (_unit isKindOf "Air") then {_markerType = "Air"; _markerColor = "ColorYellow"};

if (_unit isKindOf "Car") then {_markerType = "Car"; _markerColor = "ColorBlue"};

// If non matching item, give defaults

if (_markerType == "") then {_markerType = "Dot"};

if (_markerColor == "") then {_markerColor = "ColorBlack"};

// Create the marker

createMarker[_markerName,[1,1,1]];

_markerName setMarkerShape "ICON";

_markerName setMarkerType _markerType;

_markerName setMarkerText _markerText;

_markerName setMarkerColor _markerColor;

// Maintain marker.

while {alive _unit} do

{

_markerName setMarkerPos getPos _unit;

sleep 2;

};

// Clean up.

deleteMarker _markerName;

Anyone?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×