Jump to content
Sign in to follow this  
dayz10k

Multiplayer: Help creating a serverwide message upon script execution

Recommended Posts

I'm trying to fire an event (either serverwide or using a 4km "local" radius), but having no luck--where ever I put it, the script seems to crap out after.

I have tried using rHINT, rSPAWN (a titletext), rSPAWN (BIS_fnc_infoText), etc

This would be based upon one of the refuel scripts (scroll wheel->refuel) when at a gas station.

can anyone help me with the syntax?

thanks!

---------- Post added at 10:19 ---------- Previous post was at 10:18 ----------

script code

private ["_target", "_caller", "_id", "_isNearFeed"]; 

_target = _this select 0; 
_caller = _this select 1; 
_id = _this select 2; 

if (isNil "ib_refueling_in_progress") then { ib_refueling_in_progress = false; }; 

if (!ib_refueling_in_progress) then  
{ 
       _isNearFeed = count ((position _caller) nearObjects ["Land_A_FuelStation_Feed", 10]) > 0; 

       if (!_isNearFeed) then 
       { 
               titleText ["You must be near a fuel station pump.", "PLAIN DOWN", 3]; 
               titleFadeOut 3; 
       } 
       else 
       { 
               ib_refueling_in_progress = true; 

               titleText ["Refueling", "PLAIN", 3]; 

               while {(vehicle _caller == _target) and (local _target)} do 
               {  
                       private ["_velocity", "_fuel", "_pos"]; 

                       _velocity = velocity _target; 
                       _fuel = fuel _target;
                       _pos = position _target;

                       if ((_velocity select 0 > 1) or (_velocity select 1 > 1) or (_velocity select 2 > 1)) exitWith { };
                       if (_position select 2 > 0.5) exitWith {}; 
                       if (_fuel >= 1.0) exitWith { }; 

                       sleep 0.5; 

                       _fuel = _fuel + 0.007; 

                       if (_fuel >= 1.0) then { _fuel = 1.0; }; 

                       _target setFuel _fuel; 
               }; 

               titleFadeOut 1; 

               ib_refueling_in_progress = false; 
       }; 
};

---------- Post added at 10:22 ---------- Previous post was at 10:19 ----------

Things I've tried

[nil,nil,rHINT,"You hear the rumblings of a gas pump in the distance."] call RE;

[nil, nil, rSPAWN, [], {rHINT,"You hear the rumblings of a gas pump in the distance."}] call RE;

[nil,nil,,rTITLETEXT,format["You hear the rumblings of a gas pump in the distance.", (name _caller)],"PLAIN DOWN"] call RE;

and using rSPAWN to call BIS_fnc_infoText

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×