NPC attack bug
#1

NPC attack bot

i have a big problem !!
i can't use the NPC attack bot !! cause with my GM when the NPC connect NPC disconnect after 5 seconds ...
but with other GM the NPC works without problems
(it's not my registration system )
pls guys help me

this is the NPC (FS)
https://sampforum.blast.hk/showthread.php?tid=106257
Reply
#2

As you said you tryed it with other gamemode . it worked but the other gm you do it dont work its a problem with that gm also check your fliterscripts.
Reply
#3

can tha problem be in OnPlayerConnect or OnPlayerConnect or something like that
Reply
#4

If the NPC disconnects after 5 seconds, and not instantly, it is improbably that it is caused by OnPlayerConnect. Maybe you have a timer running, that kicks players for some reasons. Search your source for kick or ban.
You can post your OnPlayerConnect code here anyways, maybe we find something in it.
Reply
#5

well the NPC is very famous this is the NPC (FS)
Quote:

#include <a_samp>
#include <a_angles>
#include <attacking_npc>
#define FILTERSCRIPT
public OnFilterScriptInit()
{
ConnectNPC("Attack_NPC", "1");
return 1;
}
//We make sure that the NPC spawns before we make it an attacking NPC
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
if(playerid == GetPlayerID("Attack_NPC"))SetTimer("AttackNPC", 5000, 0);
{
SetPlayerTeam(playerid, 2);
SetPlayerPos(playerid,2598.9768,-2211.1077,-0.218;
}
}
return 0;
}
forward AttackNPC();
public AttackNPC()
{
CreateAttackingNPC("Attack_NPC",2598.9768,-2211.1077,-0.218;
return 0;
}

Reply
#6

console of server
Quote:

Number of vehicle models: 11
Incoming connection: 127.0.0.1:65131
[npc:join] Attack_NPC has joined the server (0:
[npcart] Attack_NPC has left the server (0:0)

Reply
#7

Exit code 0 indicates that the player (the NPC in this case) has crashed.
Reply
#8

... i really don't understand you ...
can pleas explain
Reply
#9

change:
pawn Code:
return 0;
to
pawn Code:
return 1;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)