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? Visit my web pl0x Thanks to all 200 visitors! Please, help me with the web using the contact section VOTE MTA FOR Mod Of The Year Awards 2011!
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 ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Spanish4Life Posted August 13, 2011 Author Posted August 13, 2011 Thank you, so much! Visit my web pl0x Thanks to all 200 visitors! Please, help me with the web using the contact section VOTE MTA FOR Mod Of The Year Awards 2011!
JR10 Posted August 13, 2011 Posted August 13, 2011 No problem. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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) Visit my web pl0x Thanks to all 200 visitors! Please, help me with the web using the contact section VOTE MTA FOR Mod Of The Year Awards 2011!
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 Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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