SA-MP Forums Archive
SetPlayerPos - 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: SetPlayerPos (/showthread.php?tid=599075)



SetPlayerPos - yvoms - 20.01.2016

Hello, im connecting a npc called John(0) which connects on gamemode launch.
I don't want john to be in the virtual world 0, so i've tried to set his position and virtual world onplayerspawn.
What would be the best way to do this?


Re: SetPlayerPos - SickAttack - 20.01.2016

When it spawns set its virtual world and position. Common sense.


Re: SetPlayerPos - yvoms - 20.01.2016

wow really?

Im not asking about the theory, but im asking how can i get the name or NPC id lol.


Re: SetPlayerPos - RoboN1X - 20.01.2016

OnPlayerConnect -> IsPlayerNPC -> strcmp GetPlayerName = John -> playerid = the npc id.

Well just change onplayerconnect to onplayerspawn if that's not what you mean.


Re: SetPlayerPos - yvoms - 20.01.2016

Thanks + rep <3