Can't get getPlayerUID player to work

Patric Kronberg

New Member
Hi,

I have now struggled a couple of days trying to figure out why I can't get to validage getPlayerUID player.

Im running a dayz epoch server and would like to have a couple of admin possibilities as action. One of them to spawn a crate with some gear in it.

I have in the fn_selfActions.sqf file the following addition for the admin options

Code:
waitUntil {!isNull player};
waitUntil {(getPlayerUID player) != ""};
_playerid = getPlayerUID player;


if (_playerid == "12345678") then

if((speed player <= 1) && _canDo ) then {
        if (s_admin_crate < 0) then {
            s_admin_crate = player addaction[("<t color=""#E30ED5"">" + ("Supply crate") +"</t>"),"Scripts\admin_spawnbox.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_admin_crate;
        s_admin_crate = -1;
    };
}

if I remove the validation againt playerid it works but when adding it it stops working.

I load the scripts using the init file
Code:
call compile preprocessFileLineNumbers "Scripts\compiles.sqf";

and the compiles.sqf

Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "Scripts\fn_selfActions.sqf";

Anyone that can help me figure out what Im doing wrong here.

thanks
 
Back
Top