ConnectNPC Cant see the NPC - 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: ConnectNPC Cant see the NPC (
/showthread.php?tid=102136)
ConnectNPC Cant see the NPC -
thuron - 13.10.2009
When i do ConnectNPC in my gamemode in OnGameModeInit, it sais that it doesnt know the function "ConnectNPC", but I do have a_npc included. what should i do?
Re: ConnectNPC -
Beaver07 - 13.10.2009
a_npc is a include for npcmodes only and make sure you have a_samp at the top of your script and make sure your includes are the latest 0.3 inc's then try recompiling
Re: ConnectNPC -
thuron - 13.10.2009
ah! thank you. i did have a_samp and the rest, but just not the newest ones
Re: ConnectNPC -
thuron - 15.10.2009
Now the NPC logs in, but he is not visible. I gave the train no coцrdinats, but he neather the NPC are riding. what should i do?
Re: ConnectNPC Cant see the NPC -
guidogast - 15.10.2009
hmmm. I've got the same problem..
Hope someone has a solution!
Re: ConnectNPC Cant see the NPC -
kman - 16.10.2009
does ur server have register or login?
Re: ConnectNPC Cant see the NPC -
thuron - 16.10.2009
yup
Re: ConnectNPC Cant see the NPC -
Jake Canfield - 16.10.2009
Quote:
Originally Posted by thuron
yup
|
On player request class or player request spawn add
pawn Код:
if(IsPlayerNPC(playerid)) return 1;
Re: ConnectNPC Cant see the NPC -
thuron - 16.10.2009
tryed that before, but where should i place it in the stuff thats already in there? just after the existing return 1;?
Re: ConnectNPC Cant see the NPC -
Jake Canfield - 16.10.2009
Quote:
Originally Posted by thuron
tryed that before, but where should i place it in the stuff thats already in there? just after the existing return 1;?
|
Let me give you example of where it should be placed
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid)) return 1;
new string[128];
PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pModel] = Peds[classid][0];
There you see that its the first line.