Jump to content

Error i don't know why


Hero192

Recommended Posts

Why i get this warning in line .. ? and can anyone clear this code

speakerBox = {} 
addEvent ( "onPlayerPlaceSpeakerBox", true ) 
addEventHandler ( "onPlayerPlaceSpeakerBox", root, function (isCar )  
        if ( isElement ( speakerBox [source] ) ) then 
            local x, y, z = getElementPosition ( speakerBox [source] )  
            destroyElement ( speakerBox [source] ) 
        end   
        local x, y, z = getElementPosition ( source ) 
        local rx, ry, rz = getElementRotation ( source ) 
        speakerBox [source] = createObject ( 2229, x-0.5, y+1, z-1, 0, 0, rx ) 
        triggerClientEvent ( root, "onPlayerStartSpeakerBoxSound", root,source,isCar,defaultMusic) 
        if ( isCar ) then 
            local car = getPedOccupiedVehicle ( source ) 
            local box = speakerBox [source] 
            attachElements ( box, car, 0.25, -3.3, -0.5, -0.5, 0, 0 ) 
    end 
end) 

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