Help with server-wide hint/titleText

dayz10000

Member
Trying to have an event (refuel, etc) fire a server wide or local based (~4k) rHINT or rinfoText or something but having now luck...


things I've tried (that end up killing the entire refuel script)
Code:
[] rSPAWN {["Hello World", "Hello WORLD"] spawn BIS_fnc_infoText} call RE;
Code:
[nil, nil, rSPAWN, [], {rHINT,"You hear the rumblings of a gas pump in the distance."}] call RE;
Code:
[nil,nil,rHINT,"You hear the rumblings of a gas pump in the distance."] call RE;
also, not sure on the logic of where I should put it...I think if I put it too early, it may be blocking/stopping the actual refuel from happening.

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;
        _removeREFUEL = 0;
        for "_removeREFUEL" from 0 to 50 do {player removeAction _removeREFUEL};
    }
    else
    {
        ib_refueling_in_progress = true;
 
        titleText ["Refueling, please wait...", "PLAIN", 3];
    //    [] rSPAWN {["Hello World", "Hello WORLD"] spawn BIS_fnc_infoText} call RE;
    //    [nil, nil, rSPAWN, [], {rHINT,"You hear the rumblings of a gas pump in the distance."}] call RE;
 
       
 
        while {(vehicle _caller == _target) and (local _target)} do
        {
            private ["_velocity", "_fuel"];
           
            _velocity = velocity _target;
            _fuel = fuel _target;
 
 
            if ((_velocity select 0 > 1) or (_velocity select 1 > 1) or (_velocity select 2 > 1)) exitWith {titleText ["You cannot refuel while moving!", "PLAIN", 3];};
            if (_target isKindOf "Air") exitWith {titleText ["You cannot refuel while flying!", "PLAIN", 3];};
            if (_fuel >= 1.0) exitWith {titleText ["Your vehicle does not need fuel!", "PLAIN", 3];};
 
            sleep 0.5;
       
            _fuel = _fuel + 0.007;
 
            if (_fuel >= 1.0) then { _fuel = 1.0; };
 
            _target setFuel _fuel;
           
        };
    //    [nil,nil,rHINT,"You hear the rumblings of a gas pump in the distance."] call RE;
        titleFadeOut 1;
 
        ib_refueling_in_progress = false;
    };
};
 
Back
Top