Jump to content

Taxi job take/set money


Leonard.DC

Recommended Posts

Hi, how i can make when a driver is in a taxi, and is in the taxi team, and there are a passenger in the taxi too, take money from the passenger every some seconds, and give the money to the driver of the taxi, something like a timer job, but without bots, for example a passenger have 5K and get on a taxi, every 3-4 seconds he lose 20$ and the driver earn 20$ each 3-4 seconds, what functions and handlers i should use?

Link to comment
createTeam -- to create the taxi team 
createVehicle -- to create the actual taxi 
getVehicleController -- to get the driver of the taxi 
getPlayerTeam -- to check if the driver is actually a taxi driver 
givePlayerMoney -- to give money to the driver 
isElement -- each time the timer is triggered, check whether the players actually exist 
killTimer -- if there are no players when the timer is triggered, then kill the timer 
setPlayerTeam -- to set the player to the taxi driver team 
setTimer -- a timer to make it every 3-4 seconds or whatever 
takePlayerMoney -- to take money from the passenger(s) 

Use the onVehicleEnter and onVehicleExit events to trigger the function itself.

Edited by Guest
Link to comment
You'll need these ones,

I'm a noob too but I guess these ones should do it;

-- Server 
createVehicle 
getVehicleController 
getPlayerTeam 
setPlayerMoney 
setTimer 
  
--Client  
createTeam 
setPlayerTeam 
getPlayerOccupiedVehicleSeat 

The client functions as you explained only work server-side. Also, it's more practical to use takePlayerMoney and givePlayerMoney instead of setPlayerMoney.

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