SA-MP Forums Archive
NPC Not streamed in - 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: NPC Not streamed in (/showthread.php?tid=409801)



NPC Not streamed in - jonrb - 23.01.2013

Hello,

I'm trying to add an NPC to my server. The NPC connects just fine, and according to the server [print in callbacks] the NPC spawns.

However, when I join the server and go to the NPC, he doesn't appear. The server knows the NPC's coordinates, because when I teleport to the NPC, I am placed where the NPC should be.

I should probably also add that the NPC is driving a vehicle, and the vehicle (When I teleport to the NPC is just sitting at the location the NPC should have been at.

I wasn't able to find any help in any of the tutorials, so if anybody has any thoughts your input would be greatly appreciated!


Re: NPC Not streamed in - jonrb - 23.01.2013

Bump, anybody got any idea?


Re: NPC Not streamed in - Threshold - 24.01.2013

Make sure your OnPlayerUpdate is returning 1. Make sure the bot's interior and virtual world are the same as yours. You can use SetPlayerInterior and SetPlayerVirtualWorld to change them. NOTE: The default Virtual World and Interior are 0.


Re: NPC Not streamed in - jonrb - 24.01.2013

Put this on OnPlayerUpdate (for testing purposes) and it returned "BOT 0 0"
Код:
printf("BOT %i %i",GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
What's weird is that the vehicle's position seems to be updated when I'm not in the sync range of the bot.