Connect RNPC - 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: Connect RNPC (
/showthread.php?tid=374672)
Connect RNPC -
CoaPsyFactor - 03.09.2012
Hello there,
I want to make one npc in my roleplay script, but when I try to connect it nothing is happening.
I put in onplayerconnect, onplayerspawn, and in onplayerrequestspawn if(IsPlayerNPC(playerid)) return true;
But the NPC doesn't shows up.
Here is code how do I connect it
pawn Код:
CMD:npcc(playerid, params[]){
new Float:pos[3];
Npc = ConnectRNPC("TestNpc");
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(Npc, pos[0], pos[1], pos[2]);
return true;
}
CMD:gethere(playerid, params[]){
new Float:Speed, Float:pos[3];
sscanf(params, "f", Speed);
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
MoveRNPC(Npc, pos[0], pos[1], pos[2], Speed);
return true;
}
Re: Connect RNPC -
d3n4 - 08.12.2012
same problem
Re: Connect RNPC -
Threshold - 08.12.2012
Is the NPC connected but not spawning? Or is it not connecting at all?
Re: Connect RNPC -
InfiniTy. - 08.12.2012
In your server.cfg do you have
maxnpc number
?
If not add this up
maxnpc 2
and edit the number for more npcs than 2
Re: Connect RNPC -
RajatPawar - 08.12.2012
Try putting the ConnectRNPC line under the OnGameModeInIt..