ConnectNPC Cant see the NPC
#1

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?
Reply
#2

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
Reply
#3

ah! thank you. i did have a_samp and the rest, but just not the newest ones
Reply
#4

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?
Reply
#5

hmmm. I've got the same problem..
Hope someone has a solution!
Reply
#6

does ur server have register or login?
Reply
#7

yup
Reply
#8

Quote:
Originally Posted by thuron
yup
On player request class or player request spawn add
pawn Код:
if(IsPlayerNPC(playerid)) return 1;
Reply
#9

tryed that before, but where should i place it in the stuff thats already in there? just after the existing return 1;?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)