Jump to content

Help in Job Taxi/Uber


KingBC

Recommended Posts

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