Give the vehicle driver money - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Give the vehicle driver money (
/showthread.php?tid=551374)
Give the vehicle driver money -
InceptioN1 - 18.12.2014
Hello! I want to do something like this: When a players enters a bus as a passager give the bus driver some money. How can I do that? Please help me!
Re: Give the vehicle driver money -
Divergent - 18.12.2014
Use OnPlayerEnterVehicle callback.
You can use IsPlayerInVehicle, ispassenger, and GivePlayerMoney to create this. If you want their to be a rate/mile then you can create a timer.
Re: Give the vehicle driver money -
Circle - 18.12.2014
may you download the system in ******.
Re: Give the vehicle driver money -
InceptioN1 - 18.12.2014
Quote:
Originally Posted by Divergent
Use OnPlayerEnterVehicle callback.
You can use IsPlayerInVehicle, ispassenger, and GivePlayerMoney to create this. If you want their to be a rate/mile then you can create a timer.
|
I can do what you said but when I do GivePlayerMoney I need to enter the vehicle driver ID. How do I get it? that is my question.
Re: Give the vehicle driver money -
maramizo - 18.12.2014
Quote:
Originally Posted by InceptioN1
I can do what you said but when I do GivePlayerMoney I need to enter the vehicle driver ID. How do I get it? that is my question.
|
new vehID = GetPlayerVehicleID(playerid);
Re: Give the vehicle driver money -
InceptioN1 - 18.12.2014
Quote:
Originally Posted by maramizo
new vehID = GetPlayerVehicleID(playerid);
|
I need the ID of the vehicle driver not the ID of the vehicle
Re: Give the vehicle driver money -
SickAttack - 18.12.2014
Use the MathPlugin. It has a variety of functions which you'll find useful.
Link:
https://sampforum.blast.hk/showthread.php?tid=270508.