Jump to content

What is not correct? :D


Ronis

Recommended Posts

Hello, so i have question, maybe i am wrong, but i thinking about this.

  
IN CLIENT-SIDE 
triggerServerEvent("lspd:setSirenState", theVehicle, 1) 

For example if there is the 1 it's not working , how i can put the one over here?

  
IN SERVER-SIDE 
function setSirenState() 
    if exports.global:hasItem(source, 85) then -- sirens 
        local curState = getElementData(source, "lspd:siren") 
        exports.anticheat:changeProtectedElementDataEx(source, "lspd:siren", not curState) 
        setVehicleSirensOn ( source , not curState ) 
    end 
end 
addEvent( "lspd:setSirenState", true ) 
addEventHandler( "lspd:setSirenState", getRootElement(), setSirenState ) 

Link to comment

NOP not working,

c-side

 function toggleSirens() 
    local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) 
    if (theVehicle) then 
        local occupants = getVehicleOccupants(theVehicle) 
        if occupants[0]==getLocalPlayer() then 
            triggerServerEvent("lspd:setSirenState", theVehicle, 1) 
        end 
    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...