Posts: 225
Threads: 62
Joined: Aug 2014
Reputation:
0
When I kill NPC i get crashed and I get this message : Warning: client exceeded 'ackslimit' 322.0.0.9:5206 (6882) Limit: 3000/sec. I read that i had to icrease ackslimit, but how can i do that? Im using samp 0.3z r4 version.
Posts: 21
Threads: 3
Joined: Nov 2011
Reputation:
0
on server.cfg type: ackslimit 5000
Posts: 31
Threads: 1
Joined: Nov 2014
322.0.0.9
that IP so pretty and crazy
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Your script is faulty somewhere. Raising the ackslimit isn't a solution to the problem at hand because that message shouldn't appear in the first place. By default it is impossible to kill an NPC so check the documentation for whatever plugin you are using.
Posts: 1,733
Threads: 20
Joined: Nov 2010
Reputation:
0
You're getting that message because your server is sending over 3000 messages per second to the client or vice versa.
Every message needs an acknowledge (response) to be sure it got delivered.
Somewhere in your script, you're using a massive loop to get/set data on the client with over 3000 messages (actually it's 6882 messages while 3000 is the limit).
Your script is the problem, not the server.
Increasing the limit is not good practice.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Yeah well, if that Kill statement calls the OnDeath callback then you've got yourself a nice little infinite loop!
Posts: 225
Threads: 62
Joined: Aug 2014
Reputation:
0
Could you guys fix the code for me? :/ Im not rly good at pawn.
Heres full code :
public FCNPC_OnTakeDamage(npcid, damagerid, weaponid, bodypart)
{
new Float:HP = FCNPC_GetHealth(npcid);
if(weaponid == 34) FCNPC_SetHealth(npcid, HP-120) ; // Sniper
return 1;
}
public FCNPC_OnDeath(npcid, killerid, weaponid)
{
FCNPC_Kill(npcid);
return 1;
}