mjau Posted August 18, 2011 Share Posted August 18, 2011 hi i am going to make some locked vehicles by acl and i think i know all thr functions i need but i dont know where to start Hydra1 = createVehicle ( 520, 362.26513671875, 1997.4976806641, 21.543445587158 ) Hydra2 = Hydra3 = Hydra4 = Hydra5 = function lockTheHydras() --code for that here and i think this are what i need isObjectInACLGroup cancelEvent onVehicleStartEnter Well the problem is that if i just put an if check on isObjectInACLGroup it will do that for everyvehicle in th server how can i make it only for the 5 hydras i created? Link to comment
JR10 Posted August 18, 2011 Share Posted August 18, 2011 Make a check for source. if source == hydra1 or source == hydra2 then end Link to comment
mjau Posted August 18, 2011 Author Share Posted August 18, 2011 Hydra1 = createVehicle ( 520, 362.26513671875, 1997.4976806641, 21.543445587158 ) function lockTheHydras(player, seat, jacked) if source == Hydra1 then local accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "AR-AirForce" ) ) then return end else cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockTheHydras ) now it says something about a boolean value at get account name Link to comment
JR10 Posted August 18, 2011 Share Posted August 18, 2011 source is the vehicle. Hydra1 = createVehicle ( 520, 362.26513671875, 1997.4976806641, 21.543445587158 ) function lockTheHydras(player, seat, jacked) if source == Hydra1 then local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "AR-AirForce" ) ) then return end cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockTheHydras ) Link to comment
mjau Posted August 18, 2011 Author Share Posted August 18, 2011 Ahh forgot that did things a bit in a rush there Edi ttnx Link to comment
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