sckatchof Posted January 30, 2012 Posted January 30, 2012 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 )
GanJaRuleZ Posted January 30, 2012 Posted January 30, 2012 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 )
sckatchof Posted January 30, 2012 Author Posted January 30, 2012 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 : 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 )
Sparrow Posted January 30, 2012 Posted January 30, 2012 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)
sckatchof Posted January 30, 2012 Author Posted January 30, 2012 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 : ---------- ---------
sckatchof Posted January 30, 2012 Author Posted January 30, 2012 post the script so we can help. only this code on server side.
Castillo Posted January 30, 2012 Posted January 30, 2012 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)
sckatchof Posted January 30, 2012 Author Posted January 30, 2012 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
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