SA-MP Forums Archive
Object Following Player - 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: Object Following Player (/showthread.php?tid=91507)



Object Following Player - V1ceC1ty - 15.08.2009

ive searched round and i cant seem to find anything but basicly i need something that will allow me to add an object and follow the closest player


Re: Object Following Player - Correlli - 15.08.2009

I guess you didn't searched: https://sampwiki.blast.hk/wiki/AttachObjectToPlayer


Re: Object Following Player - V1ceC1ty - 15.08.2009

yea i know but how do i get it to follow say a random person? o would that do it?


Re: Object Following Player - iLinx - 15.08.2009

could be wrong,

Код:
public randobj() {
new randid = random(MAX_PLAYERS);
if(isplayerconnected(randid)) {
//your code here
return 1;
}
else return randobj();
}