SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 02/12/2010, 08:36 PM   #1
Amine_Mejrhirrou
Gangsta
 
Amine_Mejrhirrou's Avatar
 
Join Date: Dec 2010
Location: RAbat
Posts: 555
Reputation: 6
Angry NPC attack bug

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)
http://forum.sa-mp.com/showthread.php?t=106257
Amine_Mejrhirrou is offline  
Old 02/12/2010, 09:22 PM   #2
Kitten
High-roller
 
Join Date: Jul 2010
Location: United States
Posts: 2,169
Reputation: 345
Default Re: NPC attack bug

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.
Kitten is offline  
Old 03/12/2010, 06:09 AM   #3
Amine_Mejrhirrou
Gangsta
 
Amine_Mejrhirrou's Avatar
 
Join Date: Dec 2010
Location: RAbat
Posts: 555
Reputation: 6
Default Re : NPC attack bug

can tha problem be in OnPlayerConnect or OnPlayerConnect or something like that
Amine_Mejrhirrou is offline  
Old 03/12/2010, 06:41 AM   #4
Mauzen
High-roller
 
Mauzen's Avatar
 
Join Date: Jun 2007
Location: Western Germany
Posts: 4,878
Reputation: 1597
Default Re: NPC attack bug

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.
Mauzen is offline  
Old 03/12/2010, 03:34 PM   #5
Amine_Mejrhirrou
Gangsta
 
Amine_Mejrhirrou's Avatar
 
Join Date: Dec 2010
Location: RAbat
Posts: 555
Reputation: 6
Exclamation Re : NPC attack bug

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;
}
Amine_Mejrhirrou is offline  
Old 03/12/2010, 03:38 PM   #6
Amine_Mejrhirrou
Gangsta
 
Amine_Mejrhirrou's Avatar
 
Join Date: Dec 2010
Location: RAbat
Posts: 555
Reputation: 6
Default Re : NPC attack bug

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)
Amine_Mejrhirrou is offline  
Old 03/12/2010, 04:09 PM   #7
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,066
Reputation: 2660
Default Re: NPC attack bug

Exit code 0 indicates that the player (the NPC in this case) has crashed.
__________________
Vince is offline  
Old 03/12/2010, 05:13 PM   #8
Amine_Mejrhirrou
Gangsta
 
Amine_Mejrhirrou's Avatar
 
Join Date: Dec 2010
Location: RAbat
Posts: 555
Reputation: 6
Default Re : Re: NPC attack bug

... i really don't understand you ...
can pleas explain
Amine_Mejrhirrou is offline  
Old 08/12/2010, 07:05 PM   #9
[WSF]ThA_Devil
Gangsta
 
[WSF]ThA_Devil's Avatar
 
Join Date: Sep 2010
Location: United Kingdom
Posts: 662
Reputation: 55
Default Re: NPC attack bug

change:
pawn Code:
return 0;
to
pawn Code:
return 1;
__________________
Quote:
Originally Posted by Shinobu View Post
Somebody save me, I am not a server.
[WSF]ThA_Devil is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] [GM]RC Attack Mikep Gamemode Scripts 16 11/11/2010 07:38 PM
[HELP] BoT attack!!! [KOTS]Soup_Mex Server Support 9 14/10/2010 06:57 PM
Bot attack? 0ne Help Archive 0 25/04/2010 04:41 PM
Bot attack [KaE]Cartman Server Support 3 18/08/2009 03:10 PM
another bot attack Etthan Server Support 4 04/06/2009 03:53 AM


All times are GMT. The time now is 04:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.