KingBC Posted June 6, 2018 Share Posted June 6, 2018 I wanted to create a taxi/uber job that the passenger/player (not NPC) would be charged after getting off the vehicle. How can I do this? Link to comment
aka Blue Posted June 6, 2018 Share Posted June 6, 2018 Server: onVehicleExit, onVehicleStartExit or Client: onClientVehicleExit onClientVehicleStartExit Link to comment
PSWGM9100 Posted June 8, 2018 Share Posted June 8, 2018 (edited) TaxiCars = { -- valid Vehicle ID's [420] = true, [438] = true } function enterTaxiVehicle(player,seat) local taxiVehicle = getPedOccupiedVehicle ( player ) local taxiVehicleID = getVehicleID(taxiVehicle) if TaxiCars[taxiVehicleID] == true then if taxiDriver == true and seat == 0 then cancelEvent(true,nil) return false end local taxiDriver = getVehicleOccupant ( player ) if taxiDriver == true then takePlayerMoney(player,500) givePlayerMoney(taxiDriver,500) else cancelEvent(true,nil) end end end addEventHandler("onVehicleStartEnter",getRootElement(),enterTaxiVehicle) I dont test it. Edited June 8, 2018 by PSWGM9100 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