Witch_Hunter 0 Posted July 8, 2020 Hello, me and my friends want to write a script that you can use to get into any locked vehicle. This function should only be possible for the civilian faction. And we are stuck, we are all new to SQF. Thanks for your help. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 8, 2020 If (side player isEqualTo civilian) then {player moveInAny _vehicleObject;}; this is not the solution but could be part of it. A good way to get a specific answer is to ask a specific question AND to show what you tried already. Only very few guys will do all the work for you and give you your all-in-one-solution... Share this post Link to post Share on other sites
pierremgi 4739 Posted July 9, 2020 In the init field of the vehicle, just write: if (local this) then { this lock 2; this addAction ["Unlock the vehicle", { params ["_veh","_plyr","_id"]; if (locked _veh >1) then { [_veh,0] remoteExec ["lock",_veh]; _veh setUserActionText [_id,"Lock the vehicle"]; } else { [_veh,2] remoteExec ["lock",_veh]; _veh setUserActionText [_id,"Unlock the vehicle"]; }; },nil,6,false,false,"","side _this == civilian",12]; }; 1 Share this post Link to post Share on other sites