get passenger name? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: get passenger name? (
/showthread.php?tid=143565)
get passenger name? -
falor - 23.04.2010
Hey guys,
i am actually making my own vehicle system and i don't know how to get the driver name.
Because my system works like that :
"/sell id price"
and after the buyer write "/accept car" into the passenger place.
And i need the driver name to givemoney to him.
Thanks for your help!
Re: get passenger name? -
dcmd_crash - 23.04.2010
Basically, do a loop through all of the players with the drivers vehicle ID and check if there is any other passenger in the same vehicle ID as the driver, then check that the player is in the passenger seat with:
https://sampwiki.blast.hk/wiki/GetPlayerVehicleSeat
and after that, do your code.
Re: get passenger name? -
falor - 23.04.2010
There isn't a easier way?
I just want to take an amount of money to the driver
Can i get his id?
Код:
new pvente = VehicleInfo[vehicleID][price];
new vdname;
vdname = VehicleInfo[vehicleID][owner];
GivePlayerMoney(vdname, pvente);
This doesn't work