This version of your code should work in multiplayer
Private ["_unit","_target"];
_unit = _this select 0; //player unit
call compile preprocessfile "SHK_pos\shk_pos_init.sqf";
if (random 1 < 0.30) then {
_target = (playableUnits) call BIS_fnc_selectRandom;
_unit setPosATL (_target modelToWorld [0,-3,0]); //spawn behind the unit - avoid friendly fire incidents.
} else {
_pos = ["mrkGreen",0,["mrkRed","mrkYellow"]] call SHK_pos;
_unit setPosATL _pos;
};