Spanish4Life Posted August 16, 2011 Share Posted August 16, 2011 skinid = getElementModel(player) carid = getElementModel(theVehicle) if skinid == 280 or 281 or 282 and carid == 596 or 598 or 597 and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "police" ) ) then outputChatBox ("REMEMBER: This is a government car.") else setPlayerWantedLevel ( source, 4 ) outputChatBox ("You rob a Police car! A 4-level star has been given to you.") end Link to comment
SDK Posted August 16, 2011 Share Posted August 16, 2011 Well, the error is pretty obvious isn't it? You have a bad argument in getElementModel, which means theVehicle isn't a vehicle. Post the code where you define "theVehicle". Also, your ifthenelse should be like this: skinid = getElementModel(player) carid = getElementModel(theVehicle) if skinid==280 or skinid==281 or skinid==282 and carid==596 or carid==598 or carid==597 and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "police" ) ) then outputChatBox ("REMEMBER: This is a government car.") else setPlayerWantedLevel ( source, 4 ) outputChatBox ("You rob a Police car! A 4-level star has been given to you.") end 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