Jump to content

Can't get a script to work right


TheMtaUser555

Recommended Posts

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

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