if !(_hastoolb) exitWith {
cutText [format["Needs a toolbox to help this people."], "PLAIN DOWN"];
};
if (_nearmiss && _hastoolb) then {
lastuse = time;
sleep 1;
player playActionNow "Medic";
player removeWeapon "ItemToolbox";
sleep 3;
cutText [format["vehicle fixed you get more humanity"], "PLAIN DOWN"];
Question
juandayz
Im working in a new script and need to know if
anyone knows how is the code to add/remove humanity if player do some action.
heres the script.. in blue whers players must be gain humanity
private ["_playerPos","_nearmiss","_inventory","_LastUsedTime","_Time","_hastoolb"];
call gear_ui_init;
_playerPos = getPosATL player;
_nearmiss = count nearestObjects [_playerPos, ["touringcar"], 3] > 0;
_random = round(random(4));
_LastUsedTime = 180;
_Time = time - lastuse;
_inventory = items player;
_hastoolb = "ItemToolbox" in _inventory;
if(_Time < _LastUsedTime) exitWith {
cutText [format["waith anothers %1 seconds !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"];
};
if !(_hastoolb) exitWith {
cutText [format["Needs a toolbox to help this people."], "PLAIN DOWN"];
};
if (_nearmiss && _hastoolb) then {
lastuse = time;
sleep 1;
player playActionNow "Medic";
player removeWeapon "ItemToolbox";
sleep 3;
cutText [format["vehicle fixed you get more humanity"], "PLAIN DOWN"];
GAIN HUMANITY
sleep 10;
deleteVehicle _303 ;
};
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now