So in my previous post I mentioned that the antihack was blocking rtitletext
Ive updated the antihack and this is no longer a problem HOWEVER, the script still isn't running!
Im using this carepackage script
private ["_positionM","_Marker","_LastUsedTime","_height","_downspeed""_distance","_boxtype","_unit","_getPos","_position","_box","_chute","_smoke","_var","_textt","_tools","_items","_getPos2","_positionB","_supplies","_weapon","_weapon2","_weapon3","_weapon4","_weapon5","_weapon6","_giveWep","_possibleMags","_mag","_whichBuild","_crateItems","_text"]; //_cost = 2000; //_wealth = player getVariable["cashMoney",0]; _distance = 500; _boxtype = "USVehicleBox_EP1"; _LastUsedTime = 10; _height = 100; _downspeed = -3; _OnlineLimit = 1; _unit = player; _getPos = getPos _unit; _position = [_getPos select 0, (_getPos select 1) - 5, _height]; _positionM = [_getPos select 0, _getPos select 1]; //System Chat Message _playerName = name player; //System Chat Message //item lists _tools = ["ItemEtool","ItemKnife","ItemGPS"]; _items = ["ItemSodaPepsi","FoodCanSardines"]; //_walls = ["ItemWoodWallGarageDoor","ItemWoodWallWithDoorLg","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodFloor","metal_floor_kit"]; _supplies = ["ItemTankTrap","PartGlass"]; /* _giveWep = ["FHQ_ACR_WDL_TWS_SD","BAF_LRR_scoped","USSR_cheytacM200_sd"] call BIS_fnc_selectRandom; _possibleMags = getArray (configfile >> "cfgWeapons" >> _giveWep >> "magazines"); _mag = _possibleMags select 0; */ //select arrays to use _crateItems = [_supplies,_items] call BIS_fnc_selectRandom; _Time = time - lastpack; if(_Time < _LastUsedTime) exitWith { // If cooldown is not done then exit script cutText [format["please wait %1 before calling in another Air Drop!",(round(_Time - _LastUsedTime))], "PLAIN DOWN"]; //display text at bottom center of screen when players cooldown is not done }; //if(!(canbuild) || (inSafeZone)) exitWith { cutText ["\n\nYou are in a Safezone and cannot perform that action!" , "PLAIN DOWN"]; }; if (dayz_combat == 1) exitwith { cutText ["\n\nYou are in combat and cannot perform that action!", "PLAIN DOWN"] }; if ((count playableUnits) < _OnlineLimit) exitWith { cutText [format["Air Drop Failed. Less Than %1 Players online.",_OnlineLimit], "PLAIN DOWN"]; }; /*if(_wealth < _cost) exitWith { cutText [format["You need %1 coins to Call an AirDrop.",_cost], "PLAIN DOWN"]; }; player setVariable["cashMoney",(_wealth - _cost),true]; PVDZE_plr_Save = [player,(magazines player),true,true] ; publicVariableServer "PVDZE_plr_Save";*/ deleteMarker "MarkerDrop"; _null = createMarker ["MarkerDrop",_positionM]; "MarkerDrop" setMarkerText "Air Drop"; "MarkerDrop" setMarkerType "Vehicle"; "MarkerDrop" setMarkerColor "ColorRed"; //System Chat Message _message = format["%1 has called in an AirDrop. It will arrive in 100 seconds! It is marked on your map, Go Capture it!",_playerName]; [nil,nil,rTitleText,_message, "PLAIN",6] call RE; diag_log text format["[AirDrop]: Air Drop Called By a Player Successfully"]; //System Chat Message lastpack = time; for "_x" from 1 to 10 do { if (_x >= 2) then {cutText [format ["AIR DROP ARRIVING IN %1", 101-_x], "PLAIN DOWN"];}; uiSleep 1; }; _chute = createVehicle ["ParachuteMediumEast", _position, [], 0, "FLY"]; _chutePos = getPos _chute; _box = createVehicle [_boxtype, _chutePos, [], 0, "FLY"]; _box attachTo [_chute, [0,0,3]]; _box setVariable ["Mission",1,true]; _chute setVariable ["Mission",1,true]; _box setVariable ["ObjectID", ""]; _chute setVariable ["ObjectID", ""]; _smoke = "SmokeShellBlue" createVehicle (getPos _box); _smoke attachTo [_box, [0,0,0]]; _var = floor((random 20) + 1); //display text to alert user _textt = format ["\nCarepackage is above you!",10]; titleText [_textt,"PLAIN DOWN"]; waitUntil {getPos _box select 2 < 4}; /* while {getPos _box select 2 > 4} do { _chute SetVelocity [0,0,_downspeed]; uiSleep 0.1; }; */ detach _box; while {getPos _box select 2 > 0} do { _box setPos [getPos _box select 0, getPos _box select 1, (getPos _box select 2) - .25] }; deleteVehicle _chute; _posATL = getPosATL _box; deleteVehicle _box; _boxx = _boxtype createVehicle _posATL; _boxx setVariable ["Mission",1,true]; _boxx setVariable ["ObjectID", ""]; clearweaponcargoglobal _boxx; clearmagazinecargoglobal _boxx; /* {_boxx addMagazineCargoGlobal [_x, _var];} forEach _crateItems; {_boxx addWeaponCargoGlobal [_x, 5];} forEach _tools; _boxx addMagazineCargoGlobal [_mag, _var]; _boxx addWeaponCargoGlobal [_giveWep, 5]; */ for "_i" from 0 to 9 do { _giveWep = ["FHQ_ACR_WDL_TWS_SD","BAF_LRR_scoped","USSR_cheytacM200_sd","FHQ_ACR_BLK_RCO_GL","BAF_LRR_scoped_W","USSR_cheytacM200"] call BIS_fnc_selectRandom; _possibleMags = getArray (configfile >> "cfgWeapons" >> _giveWep >> "magazines"); _mag = _possibleMags select 0; _boxx addMagazineCargoGlobal [_mag, _var]; _boxx addWeaponCargoGlobal [_giveWep, 1]; }; {_boxx addMagazineCargoGlobal [_x, _var];} forEach _crateItems; {_boxx addWeaponCargoGlobal [_x, 1];} forEach _tools; _getPos2 = getPos _boxx; _positionB = [_getPos2 select 0, _getPos2 select 1]; deleteMarker "MarkerDrop"; _null = createMarker ["MarkerDrop",_positionB]; "MarkerDrop" setMarkerText "Air Drop"; "MarkerDrop" setMarkerType "Defend"; "MarkerDrop" setMarkerColor "ColorRed"; _message3= format["The Carepackage has Landed! Check Your Map and Race to Claim it!",_playerName]; [nil,nil,rTitleText,_message3, "PLAIN",6] call RE; diag_log text format["[AirDrop]: Air Drop Landed Successfully"]; //Wait until player is near, wait 90 seconds and delete marker/box. waitUntil{ sleep 1; (({isPlayer _x && _x distance _boxx <= 5} count playableUnits > 0)); }; _message2 = format["A player is at the carepackage! It will despawn in 90 seconds!",_playerName]; [nil,nil,rTitleText,_message2, "PLAIN",6] call RE; diag_log text format["[AirDrop]: Air Drop Landed Successfully"]; sleep 10; deleteMarker "MarkerDrop"; deleteVehicle _boxx; _message = format["The Air Drop has been Captured",_playerName]; [nil,nil,rTitleText,_message, "PLAIN",6] call RE; diag_log text format["[AirDrop]: Air Drop captured Successfully. Deleting Marker"];
I execute it in the fn_selfactions.sqf when a player looks at a specific object...
with that antihack off it works beautifully. Turn on the antihack, and when you click on the object nothing happens.
So
Player looks at object
Scroll wheel action appears
Player clicks scroll wheel action
Nothing happens.
Works with antihack disabled.
Any ideas?