Estevam2d Posted August 30, 2014 Share Posted August 30, 2014 Help-me I can not leave the car in the planned time. sorry for the bad english. local allowedTeams = { ["Mecanico"] = true, ["Staff"] = true, } function fix () car = getPedOccupiedVehicle(source) if allowedTeams[getTeamName(getPlayerTeam(source))] and getElementHealth(car) < 999 then price = 1001 - getElementHealth(car) givePlayerMoney(source, price*20) outputChatBox("Este carro sera reparado em 10 segundos.", source, 0, 255, 255) toggleControl (source, "enter_exit", false) setTimer ( function() fixVehicle(car) end, 10000, 1 ) setTimer ( function() toggleControl (source, "enter_exit", true) end, 15000, 1 ) -- <= Error here end end addEventHandler("onPlayerVehicleEnter", getRootElement(), fix) Link to comment
Estevam2d Posted August 30, 2014 Author Share Posted August 30, 2014 Solved by myself ... difficult but not impossible. Link to comment
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