Jump to content

[RELEASE]^[SHOWER IN RIVERS]


Recommended Posts

27 minutes ago, JohnnyBravo666 said:

Try the following. Right now, that might make it work only once per restart as I have looked at how the bank robbery script went as I knew they had a restriction coded in for once a restart. But I pulled a piece of that code out so this might work. Give this a try, otherwise you'll have to try a workaround on this.

 

  Hide contents

private ["_dis","_sfx","_LastUsedTime","_Time","_infectrand","_welcomeMessage","_camDistance"];
///VARIABLES

// Checks if script is active, thanks Halvhjearne <3
if(isNil "script_in_progress")then{
        script_in_progress = false;
};
 
if(script_in_progress)exitwith{
        systemChat "This script is only useable once (untill restart)!";
};
script_in_progress = true;

_infectrand = round(random 10);
_welcomeMessage = format["Nice you take a shower +400Humanity!, %1,",format["%1", name player]];
_camDistance = 60;
///////////////////////////////////
//NEGATIVES

///////////

//START SCRIPT
lastuse = time;

        _dis = 5;
        _sfx = "fillwater";
        [player,_sfx,0,false,_dis] call dayz_zombieSpeak;
        [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
        [player,+400] call player_humanityChange;
        //RANDOM INFECTION START TO WORK
        if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };
    //CAMERA START
    showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 8;
 
   cutText [_welcomeMessage, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;
  sleep 1;

 

tnks a lot for the help jhonny  its a great idea but i think this work like my restriction time.  See the script works as local, each players execute it by self.  Your way and my can works only 1 time per restart if the script was called by the server at the start of it. But if i use this way only 1 player can use the shower option per restart. I guess.

Link to comment
Share on other sites

yeah, unfortunately Juans script is client sided, and that way of checking for a script running is server sided (with the bank robbery).  I have a similar script, static mission can only be spawned in once per restart.

 

Question? is it possible to calculate REAL time with Arma?

Link to comment
Share on other sites

36 minutes ago, theduke said:

yeah, unfortunately Juans script is client sided, and that way of checking for a script running is server sided (with the bank robbery).  I have a similar script, static mission can only be spawned in once per restart.

 

Question? is it possible to calculate REAL time with Arma?

I run the bank robbery script on client side though and it prevents people from doing it even if they log out ? 

Link to comment
Share on other sites

5 minutes ago, JohnnyBravo666 said:

I run the bank robbery script on client side though and it prevents people from doing it even if they log out ? 

 

Thats because the bank robbery is server sided. Juans script is client sided. Anything client sided they can relog and its like it never happened

@juandayz, yeah i dont think there is a way...

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...