TheMtaUser555 Posted September 9, 2011 Share Posted September 9, 2011 policeVehicles = { [416]=true,[574]=true, [433]=true, [427]=true, [490]=true, [528]=true, [407]=true, [544]=true, [523]=true, [470]=true, [598]=true, [596]=true, [597]=true, [599]=true, [432]=true, [601]=true, [428]=true, [497]=true, [510]=true, [564]=true} x,y,z = getElementPosition( not policeVehicles[getElementModel(source)] ) function enterVehicle (loss) if ( not policeVehicles[getElementModel(source)] ) then blip = createBlipAttachedTo ( source, 55, 1 ) end if ( policeVehicles[getElementModel(source)] ) and (x+10, y+10, z+10, 0, 0, 0, getElementAttachedOffsets (x,y,z)) then outputChatBox ( "#FF0000Crook Escaped!", getRootElement(), 255, 255, 255, true ) end end addEventHandler ( "onVehicleDamage", getRootElement(), enterVehicle ) it's all serverside What I want to do is if a player inside a regular vehicle damages his vehicle and gets far away from a player inside a police vehicle, appears a message on the chatbox. log: [2011-09-09 14:19:00] SCRIPT ERROR: [scripts]\crookblip\crookblip.lua:8: ')' expected near ',' [2011-09-09 14:19:00] WARNING: Loading script failed: [scripts]\crookblip\crookblip.lua:8: ')' expected near ',' please help and thanks Link to comment
JR10 Posted September 9, 2011 Share Posted September 9, 2011 policeVehicles = { [416]=true,[574]=true, [433]=true, [427]=true, [490]=true, [528]=true, [407]=true, [544]=true, [523]=true, [470]=true, [598]=true, [596]=true, [597]=true, [599]=true, [432]=true, [601]=true, [428]=true, [497]=true, [510]=true, [564]=true} function enterVehicle (loss) if ( not policeVehicles[getElementModel(source)] ) then blip = createBlipAttachedTo ( source, 55, 1 ) elseif ( policeVehicles[getElementModel(source)] ) then outputChatBox ( "#FF0000Crook Escaped!", getRootElement(), 255, 255, 255, true ) end end addEventHandler ( "onVehicleDamage", getRootElement(), enterVehicle ) Link to comment
TheMtaUser555 Posted September 9, 2011 Author Share Posted September 9, 2011 thanks JR10, but that's not what I wanted. What I want is to display a message on the chatbox when the crook drives far away from the cops. I don't understand what I'm doing wrong on my script 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