Jump to content

question


mjau

Recommended Posts

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
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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...