Spanish4Life Posted August 13, 2011 Posted August 13, 2011 function car_check ( theVehicle, seat, jacked ) -- when someone enters a vehicle function(playerSource) id = getElementModel ( theVehicle ) -- get the ID of the vehicle if id == 433 or id == 427 or id == 470 or id == 432 then if isObjectInACLGroup ( "user." .. playerSource, aclGetGroup ( "militar" ) ) then outputChatBox ("REMEMBER: This is a government car.") else local pX, pY, pZ = getElementPosition (source) createExplosion (pX, pY, pZ, 2, source) outputChatBox ("You aren't a militar! Area 51 Security sistem detected you and a rocket was going directly to your head.") end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), car_check ) What's wrong?
JR10 Posted August 13, 2011 Posted August 13, 2011 This is fucked up. function car_check ( theVehicle, seat, jacked ) -- when someone enters a vehicle id = getElementModel ( theVehicle ) -- get the ID of the vehicle if id == 433 or id == 427 or id == 470 or id == 432 then if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "militar" ) ) then outputChatBox ("REMEMBER: This is a government car.") else local pX, pY, pZ = getElementPosition (source) createExplosion (pX, pY, pZ, 2, source) outputChatBox ("You aren't a militar! Area 51 Security sistem detected you and a rocket was going directly to your head.") end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), car_check )
Spanish4Life Posted August 13, 2011 Author Posted August 13, 2011 Another q: how to add a group into a group (p.eg: militar can be SWAT)
JR10 Posted August 13, 2011 Posted August 13, 2011 If I'm right, you can't do that with ACL, use setElementData getElementData setAccountData getAccountData
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