Jump to content

JohnHSmith

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About JohnHSmith

  • Rank
    Private First Class
  1. Thank you, you saved my day ;)
  2. The Array is not only from players, just edited to show it is filled with player objects. Should I load it as it is done?
  3. I saved an array in a variable from the server using { _players pushBack _x; } forEach playableUnits; missionNamespace setVariable[ "array", _players ]; in the server scope. How to load it from client scope? I tried something like this _ply = { missionNamespace getVariable ["array", []]; } remoteExec ["bis_fnc_call", 2]; if( player in _ply ) then { diag_log "you're an player"; } But this won't work. Can anyone give me an idea?
  4. JohnHSmith

    disable spectator mode remotely

    Okay, I tried. I executed the script within the init with following: [] remoteExec ["my_function",2]; so this is my_function: ["Terminate"] remoteExec ["BIS_fnc_EGSpectator",civilian]; This is not working. All other remoteExec's to civilian are working properly.
  5. JohnHSmith

    breaking a loop from outside

    Okay, thanks for your ideas. But I want to start it from file1, and stop it from file2. How to do this? Your code only works at the same file I think.
  6. Hi, I want to make a scheduler, which is in a file called "fn_roundTimer.sqf". This timer should be able to be started and stopped from outer. I thought something like this: ["start"] spawn fnc_roundTimer; ["end"] spawn fnc_roundTimer; So I tried this: _type = param [0,"none"]; _roundTime = 60; if(_type == "start") then { while(_roundTime >= 0) do { if(_roundTime == 0) exitWith { diag_log "round finished"; }; sleep 1; _roundTime = _roundTime-1; }; }; if(_type == "end") exitWith { diag_log "round has been stopped"; }; But this won't work. What am I doing wrong?
  7. Hi, I want to disable the spectator mode for all players. The code for it is ["Terminate"] call BIS_fnc_EGSpectator; But how to execute on every player? This doesn't work eiter: [] remoteExec ["['Terminate'] call BIS_fnc_EGSpectator;",civilian];
  8. JohnHSmith

    Reviving player trough script

    Okay, there is a problem. The dead player should stay at its position. So how to do that?
  9. JohnHSmith

    Reviving player trough script

    Alright, thanks! I will try that, give me a few minutes.
  10. JohnHSmith

    Reviving player trough script

    Okay, do you have an idea what exactly to do?
  11. Hi all, is it possible to revive a dead player with a script? When a player is dead, he gets into spectator mode "Bird". Now the script should revive him and terminate the spectator mode. It doesn't work with player setDamage 0; ["Terminate"] call BIS_fnc_EGSpectator;
×