NPC spawns somewhere under the map. - 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: NPC spawns somewhere under the map. (
/showthread.php?tid=118848)
NPC spawns somewhere under the map. -
wiilweer - 05.01.2010
NPC does not go where it must go. If i /goto him then I will be teleported to cords 0 0 0 (near blueberry farm). Everything is bypassed.
Код:
public OnPlayerRequestSpawn(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
if(IsPlayerNPC(playerid)) return 1;
Код:
Код:
public OnPlayerRequestClass(playerid, classid)
{
if(!IsPlayerConnected(playerid)) return 0;
if(IsPlayerNPC(playerid))
OnPlayerSpawn I've defined what skin it must have. Any ideas what makes bot to it's right place ?
Re: NPC spawns somewhere under the map. -
MadeMan - 05.01.2010
Do you use SetPlayerPos on your NPC?
Re: NPC spawns somewhere under the map. -
wiilweer - 05.01.2010
No, MyOnPlayerSpawn is this:
Код:
if(IsPlayerNPC(playerid))
{
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"Annika",true))
{
SetPlayerSkin(playerid, 193);
SetPlayerInterior(playerid, 10);
SetPlayerVirtualWorld(playerid, -1);
return 1;
}
Re: NPC spawns somewhere under the map. -
MadeMan - 05.01.2010
Have you recorded any NPC movement and use it?
Re: NPC spawns somewhere under the map. -
wiilweer - 05.01.2010
Yep, just half an hour ago i recorded standing bot in local server, in 24/7 interior.
Re: NPC spawns somewhere under the map. -
MadeMan - 05.01.2010
You don't need to record a standing bot. Just use SetPlayerPos on it and it will stand in one place.
Re: NPC spawns somewhere under the map. -
wiilweer - 05.01.2010
Okay, I try it. But sooner or later I need to create moving bot. So I have still problem.
Re: NPC spawns somewhere under the map. -
MadeMan - 05.01.2010
Make sure the .rec file and NPC script are in right folders and you're using correct file names in your script.
Re: NPC spawns somewhere under the map. -
wiilweer - 05.01.2010
I added playerpos, and angle but still sama problem. I checked my npc script and recording file, all matches..
Re: NPC spawns somewhere under the map. -
MadeMan - 05.01.2010
Can you show your NPC script?