Jump to content

need help


sckatchof

Recommended Posts

hi guys ,

why this script dose not work !

  
  
addEventHandler("onPlayerVehicleEnter", root, 
    function(vehicle, seat, jacked) 
        if getTeamName(getPlayerTeam(hitElement)) == "Police" then 
        if getElementData(source, "Cuffed") then return end 
        local model =  getElementModel(vehicle) 
        if model == 598 or model == 596 or model == 597 or model == 427 or model == 490 or model == 599 then 
            if getPlayerWantedLevel(source) < 6 then 
                setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) 
            end 
        end 
    end 
) 
  

Link to comment

Hmm , you used hitElement insteand of 'source'

  
addEventHandler("onPlayerVehicleEnter", root, 
    function(vehicle, seat, jacked) 
        if getTeamName(getPlayerTeam(source)) == "Police" then 
        if getElementData(source, "Cuffed") then return end 
        local model =  getElementModel(vehicle) 
        if model == 598 or model == 596 or model == 597 or model == 427 or model == 490 or model == 599 then 
            if getPlayerWantedLevel(source) < 6 then 
                setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) 
            end 
        end 
    end 
) 

Link to comment
Hmm , you used hitElement insteand of 'source'
  
addEventHandler("onPlayerVehicleEnter", root, 
    function(vehicle, seat, jacked) 
        if getTeamName(getPlayerTeam(source)) == "Police" then 
        if getElementData(source, "Cuffed") then return end 
        local model =  getElementModel(vehicle) 
        if model == 598 or model == 596 or model == 597 or model == 427 or model == 490 or model == 599 then 
            if getPlayerWantedLevel(source) < 6 then 
                setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) 
            end 
        end 
    end 
) 

ty but ,same problem

ERROR :

a5essl.jpg

  
addEventHandler("onPlayerVehicleEnter", root, 
    function(vehicle, seat, jacked) 
        if getTeamName(getPlayerTeam(source)) == "Police" then 
        if getElementData(source, "Cuffed") then return end 
        local model =  getElementModel(vehicle) 
        if model == 598 or model == 596 or model == 597 or model == 427 or model == 490 or model == 599 then 
            if getPlayerWantedLevel(source) < 6 then 
                setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) 
            end 
        end 
    end 
) 

Link to comment

you forget the "end", also the error in mtaserver.exe is not what is in this script.

  
addEventHandler("onPlayerVehicleEnter", root, 
    function(vehicle, seat, jacked) 
        if getTeamName(getPlayerTeam(source)) == "Police" then 
        if getElementData(source, "Cuffed") then return end 
        local model =  getElementModel(vehicle) 
        if model == 598 or model == 596 or model == 597 or model == 427 or model == 490 or model == 599 then 
            if getPlayerWantedLevel(source) < 6 then 
                setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) 
            end 
        end 
    end 
end) 
  

Link to comment
you forget the "end", also the error in mtaserver.exe is not what is in this script.
  
addEventHandler("onPlayerVehicleEnter", root, 
    function(vehicle, seat, jacked) 
        if getTeamName(getPlayerTeam(source)) == "Police" then 
        if getElementData(source, "Cuffed") then return end 
        local model =  getElementModel(vehicle) 
        if model == 598 or model == 596 or model == 597 or model == 427 or model == 490 or model == 599 then 
            if getPlayerWantedLevel(source) < 6 then 
                setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) 
            end 
        end 
    end 
end) 
  

thank you sparrow but some problem again this my screen :

----------

vpkz0z.jpg

---------

Link to comment
addEventHandler("onPlayerVehicleEnter", root, 
function(vehicle, seat, jacked) 
    if (getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) == "Police") then 
        if getElementData(source, "Cuffed") then return end 
        local model = getElementModel(vehicle) 
        if (model == 598 or model == 596 or model == 597 or model == 427 or model == 490 or model == 599) then 
            if (getPlayerWantedLevel(source) < 6) then 
                setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) 
            end 
        end 
    end 
end) 

Link to comment
addEventHandler("onPlayerVehicleEnter", root, 
function(vehicle, seat, jacked) 
    if (getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) == "Police") then 
        if getElementData(source, "Cuffed") then return end 
        local model = getElementModel(vehicle) 
        if (model == 598 or model == 596 or model == 597 or model == 427 or model == 490 or model == 599) then 
            if (getPlayerWantedLevel(source) < 6) then 
                setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) 
            end 
        end 
    end 
end) 

thank you snake it's work :P

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