Get Playername from Vehicle ID - 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: Get Playername from Vehicle ID (
/showthread.php?tid=551567)
Get Playername from Vehicle ID -
Alex_T - 19.12.2014
Hello, is there any way of getting a players name from the vehicle ID. EX: If I type in /vowner [carid]. It will show me who owns the car from the vehicle ID.
AW: Get Playername from Vehicle ID -
Flori - 19.12.2014
Yes, it is possible. Link the created cars to the playerid. When you type the command you can loop for example through all players to find the owner.
Re: Get Playername from Vehicle ID -
Alex_T - 19.12.2014
No easy function or anything to use?
AW: Get Playername from Vehicle ID -
Flori - 19.12.2014
I thought you will know how to do it after my hint. Well, i don't know your codes, so i can't do more than giving you that hint.
Re: Get Playername from Vehicle ID -
Alex_T - 19.12.2014
I understand what you mean, but for the loop. Would you just need something like +1 to player id until playeridcar = carid or what?