Give the vehicle driver money
#1

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!
Reply
#2

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.
Reply
#3

may you download the system in ******.
Reply
#4

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.
Reply
#5

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);
Reply
#6

Quote:
Originally Posted by maramizo
Посмотреть сообщение
new vehID = GetPlayerVehicleID(playerid);
I need the ID of the vehicle driver not the ID of the vehicle
Reply
#7

Use the MathPlugin. It has a variety of functions which you'll find useful.

Link: https://sampforum.blast.hk/showthread.php?tid=270508.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)