DAKA Posted July 27, 2017 Report Share Posted July 27, 2017 How would I go about restricting the access and use of certain vehicles based off of humanity. Hooty 1 Link to comment Share on other sites More sharing options...
icomrade Posted July 28, 2017 Report Share Posted July 28, 2017 easiest way would be to probably make a nested array of vehicle classes and humanity. in your init.sqf or variables.sqf add (preferably around the same line as ConfigVariable.sqf) DZE_VehHumanityReq = [["vehclass1",123],["Vehclass2",123],["Vehclass3",123]]; At the bottom of the inveh check in fn_damageActions https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/fn_damageActions.sqf#L19-L78 add the following code: _humanity = player getVariable["humanity",0]; { _CheckVeh = _x select 0; _HumanityReq = _x select 1; if (((vehicle player) == _CheckVeh) && {_humanity < _HumanityReq}) then { //you can also check assigned roles to restrict certain seats if you are so inclined player action ["getOut", (vehicle player)]; (format ["Your humanity, %1, is less than the required humanity, %2, to use this vehicle", _humanity, _HumanityReq]) call dayz_rollingMessages; }; } forEach DZE_VehHumanityReq; Link to comment Share on other sites More sharing options...
DAKA Posted July 28, 2017 Author Report Share Posted July 28, 2017 Do I put in before the last }; or after the last }; Link to comment Share on other sites More sharing options...
DAKA Posted July 28, 2017 Author Report Share Posted July 28, 2017 im wanting to just restrict the player from getting into the pilot seat. Link to comment Share on other sites More sharing options...
icomrade Posted July 28, 2017 Report Share Posted July 28, 2017 You should be able to figure both of those out on your own :) considering the checks for the vehicle seat position are already in the code block, it wouldn't be hard, just a matter of code placement BigEgg 1 Link to comment Share on other sites More sharing options...
DAKA Posted July 28, 2017 Author Report Share Posted July 28, 2017 im not a scripter. but i guess i will try Link to comment Share on other sites More sharing options...
DAKA Posted July 28, 2017 Author Report Share Posted July 28, 2017 think i figured it out, but i still dont know what position to paste the code Link to comment Share on other sites More sharing options...
DAKA Posted July 28, 2017 Author Report Share Posted July 28, 2017 first test, no go. Link to comment Share on other sites More sharing options...
DAKA Posted July 28, 2017 Author Report Share Posted July 28, 2017 well I have no idea. Thank for trying to help me. Link to comment Share on other sites More sharing options...
Kovicson Posted July 30, 2017 Report Share Posted July 30, 2017 On 28/07/2017 at 6:33 PM, DAKA said: well I have no idea. Thank for trying to help me. Any luck with it? Link to comment Share on other sites More sharing options...
DAKA Posted July 30, 2017 Author Report Share Posted July 30, 2017 Yes, someone is helping me with it and they figured it out. it was all them. im too stupid to do anything, but i have learned a lot just looking at they gave me. I have now decided that I am going to learn more so maybe one day i can write my own scripts. Link to comment Share on other sites More sharing options...
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