raynner Posted November 8, 2015 Posted November 8, 2015 hello friends again come to enlist the help of you good I created a simple script to auto destroir servants vehicles trough a panel however came across the lack of a emportante party and to cancel this event when the player returns to the vehicle porediriam you help me or correct ? function destroyVehicle(vehicle) local check=false for i,player in ipairs(getElementsByType("player")) do if getPlayerOccupiedVehicle(player)==vehicle then check=true end end if check==false then destroyElement(vehicle[source]) end end function exitVehicle(vehicle) if isElement(vehicle[source]) then setTimer(destroyElement(vehicle[source]),30000,1,vehicle) end end addEventHandler("onPlayerVehicleExit",getRootElement(),exitVehicle)
jingzhi Posted November 15, 2015 Posted November 15, 2015 hello friends again come to enlist the help of you good I created a simple script to auto destroir servants vehicles trough a panel however came across the lack of a emportante party and to cancel this event when the player returns to the vehicle porediriam you help me or correct ? function destroyVehicle(vehicle) local check=false for i,player in ipairs(getElementsByType("player")) do if getPlayerOccupiedVehicle(player)==vehicle then check=true end end if check==false then destroyElement(vehicle[source]) end end function exitVehicle(vehicle) if isElement(vehicle[source]) then setTimer(destroyElement(vehicle[source]),30000,1,vehicle) end end addEventHandler("onPlayerVehicleExit",getRootElement(),exitVehicle) I am sorry to say, most of your script doesn't make sense, watch what other people do and you will know how to script
raynner Posted November 23, 2015 Author Posted November 23, 2015 hello friends again come to enlist the help of you good I created a simple script to auto destroir servants vehicles trough a panel however came across the lack of a emportante party and to cancel this event when the player returns to the vehicle porediriam you help me or correct ? function destroyVehicle(vehicle) local check=false for i,player in ipairs(getElementsByType("player")) do if getPlayerOccupiedVehicle(player)==vehicle then check=true end end if check==false then destroyElement(vehicle[source]) end end function exitVehicle(vehicle) if isElement(vehicle[source]) then setTimer(destroyElement(vehicle[source]),30000,1,vehicle) end end addEventHandler("onPlayerVehicleExit",getRootElement(),exitVehicle) I am sorry to say, most of your script doesn't make sense, watch what other people do and you will know how to script Oks, thank you
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