Client Ackslimit Exceed! - 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: Client Ackslimit Exceed! (
/showthread.php?tid=554428)
Client Ackslimit Exceed! -
danish007 - 03.01.2015
hello this, im having a problem with command (/whisper) this command crash my server by spaming more than 2 times.
it exceed m client limit.
please tell me what is the problem and tell me its fixes!
Код:
COMMAND:w(playerid, params[])
{
return cmd_whisper(playerid, params);
}
COMMAND:whisper(playerid, params[])
{
if (PlayerInfo[playerid][pSpawned] == 1)
{
new COLOR = GetPlayerColor(playerid);
new idx,string[512],length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[512];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if (PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"#Error: You Muted.");
return 1;
}
if(stringContainsIP(result))
{
SendClientMessage(playerid,COLOR_ERROR,"Invalid Message.");
return 1;
}
if (!strlen(result))
{
SendClientMessage(playerid, COLOR_ERROR, "USAGE: /whisper (message).");
return 1;
}
format(string, sizeof(string), "(WHISPER) %s (%d): {FFFFFF}%s",PlayerInfo[playerid][pName],playerid,result);
SendClientMessage(playerid,COLOR, string);
for (new i = 0; i < GetMaxPlayers(); i++)
{
i = GetClosestPlayer(playerid);
if (IsPlayerConnected(i))
{
if (i != playerid)
{
if (GetDistanceBetweenPlayers(playerid, i) < 10)
{
SendClientMessage(i,COLOR, string);
}
}
}
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
}
return 1;
}
Re: Client Ackslimit Exceed! -
Sledgehammer - 03.01.2015
You can raise your ackslimit by changing it in the server.cfg. By default it is set to 3000.
Re: Client Ackslimit Exceed! -
danish007 - 03.01.2015
yep!, i increased it from 3k to 5k and 5k to 10k still it crash server.