SA-MP Forums Archive
npc not connecting - 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 connecting (/showthread.php?tid=391855)



npc not connecting - thefatshizms - 11.11.2012

Hello, ive been reading some tutorials about npc's and when i do ConnectNPC("cj","cj");
in my gamemode the npc wont connect.. am i doing anything wrong?


Re: npc not connecting - rbush12 - 11.11.2012

Post the lines in your gamemode so we can see.


Re: npc not connecting - Sting. - 11.11.2012

If you do we might be able to help you. And if you've got a register system, I mean like Must register before play! that could also be one of the problems. I had that problem. You got to make your GM, maybe even certain filterscripts your using which of course that is important to recognize the Bot.


Re: npc not connecting - thefatshizms - 11.11.2012

I'm using a blank gm atm. This is my ongamemodeinit
pawn Код:
public OnGameModeInit()
{
    ConnectNPC("CJ","cjfirstmission");
    DisableInteriorEnterExits();
    SetGameModeText("Missions");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}
No register/login or anything like that


Re: npc not connecting - Sting. - 11.11.2012

Alright so I guess there is a problem with the code. Ermm, I'm searching.. Can you look again at the tutorial that you followed and make sure everything you did was absolutely correct. Maybe its the recording. :/


Re: npc not connecting - thefatshizms - 13.11.2012

It's still not working after many tut's.

Code from the npc:
pawn Код:
#include "a_npc.inc"
main() {}
public OnNPCSpawn()
{
    StartRecordingPlayback(2,"cjfirstmission");
    SetMyPos(2495.2539,-1690.8317,14.7656);
    return 1;
}
public OnRecordingPlaybackEnd() StartRecordingPlayback(2,"cjfirstmission");