NPC Problem :( - 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 Problem :( (
/showthread.php?tid=428557)
NPC Problem :( -
rishabh1x - 06.04.2013
Hi,
I downloaded the Attacking NPC fs by Tannz0rz but i have a problem.I placed everything correctly but when i start my server then it says
----------------------------------
[15:52:43] Running SAMPTS ~Have Fun!!!
[15:52:43] Coded By
[15:52:43] Rishabh1x
[15:52:43] ----------------------------------
[15:52:43] Number of vehicle models: 76
[15:52:43] Incoming connection: 127.0.0.1:52178
[15:52:44] [npc:join] Billy has joined the server (0:127.0.0.1)
[15:53:04]
[npc
art] Billy has left the server (0:0)
I cant understand why NPC leaves the server plz help me....
Re: NPC Problem :( -
Yiin - 06.04.2013
put
if( IsPlayerNPC( playerid )) return 1;
in these callbacks:
OnPlayerConnect,
OnPlayerSpawn,
OnPlayerRequestClass,
OnPlayerDisconnect,
OnPlayerRequestSpawn.
Re: NPC Problem :( -
MattyG - 06.04.2013
And make sure that the maxnpc line in your server.cfg is set to at least one.
Re: NPC Problem :( -
rishabh1x - 06.04.2013
here is my fs
#include <a_samp>
#include <attacking_npc>
#define FILTERSCRIPT
public OnFilterScriptInit()
{
ConnectNPC("Billy", "1");
return 0;
}
//We make sure that the NPC spawns before we make it an attacking NPC
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
if(playerid == GetPlayerID("Billy")) SetTimer("Billy", 5000, 0);
}
return 0;
}
forward Billy();
public Billy()
{
CreateAttackingNPC("Billy", 224.1008, 1822.4865, 8.2635);
return 0;
}
and maxnpc is set to 10
Re: NPC Problem :( -
rishabh1x - 07.04.2013
still no luck...someone help plzz