Wei Posted April 1, 2012 Posted April 1, 2012 How can I make that when player will join the car as passenger it will take him money and give it to the driver for every mile or km. CODE: setTeamFriendlyFire(teamtaxi, false) teamtaxi = createTeam ( "Taxi Drivers", 255, 255, 0 ) function taxiCommand ( thePlayer, command ) destroyElement ( taxiOphaalBlip ) taxiOphaalBlip = createBlipAttachedTo ( thePlayer, 48, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement() ) outputChatBox ("Car on the road, stay put!", thePlayer, 255, 190, 0, false ) outputChatBox ("Someone called taxi!", getRootElement(), 255, 190, 0, false ) end addCommandHandler ( "calltaxi", taxiCommand ) function taxiCancelCommand ( thePlayer, command ) outputChatBox ("Remember to turn off.", thePlayer, 255, 190, 0, false ) outputChatBox ("as taxi job done!", getRootElement(), 255, 190, 0, false ) destroyElement ( taxiOphaalBlip ) end addCommandHandler ( "taxicancel", taxiCancelCommand ) taxiVehicles = { [420]=true } taxiSkins = { [7]=true } function taxienterVehicle ( player, seat, jacked ) if ( taxiVehicles[getElementModel ( source )] ) and ( not taxiSkins[getElementModel ( player )] ) and ( seat == 0 ) then removePedFromVehicle ( player ) outputChatBox ( "You are not a taxi driver, you can not drive this vehicle.", player ) end end addEventHandler ( "onVehicleEnter", getRootElement(), taxienterVehicle )
Castillo Posted April 1, 2012 Posted April 1, 2012 getPlayerMoney takePlayerMoney givePlayerMoney setTimer
Wei Posted April 2, 2012 Author Posted April 2, 2012 How can I get the sit wich is player sitting on. I mean Driver or....
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