server bug if a more than 15 players conect - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: server bug if a more than 15 players conect (
/showthread.php?tid=235415)
server bug if a more than 15 players conect -
Amine_Mejrhirrou - 05.03.2011
hi all
this time my problem is very important
i'm pretty sur that the problem came from the scripts
what ever : the problem is when more than 15 or 16 or 17 players join my server ! lot of fuction stop workin ! for example : i have a (bit) system (when a zombie hit a player ! the player is infected (so he loos HP every 2 seconds ) but yesterday the server was about 25 players & the (bit) system has stoped working ! i dont know why that happen but it's very bad !!
Re: server bug if a more than 15 players conect -
-Rebel Son- - 05.03.2011
Sounds like a loop problem. Show your function and timer please.
Re : server bug if a more than 15 players conect -
Amine_Mejrhirrou - 05.03.2011
ok this's tha systm
Quote:
if((newkeys & KEY_FIRE) && (team[playerid] == 2))
{
new Float:hp, Float:a;
new target = GetClosestPlayer(playerid);
if(target == INVALID_PLAYER_ID || target == playerid) return 1;
if(team[target] == 2) return 1;
GetPlayerArmour(target,a);
target = GetClosestPlayer(playerid);
if(target == INVALID_PLAYER_ID || target == playerid) return SendClientMessage(playerid, YELLOW, "no human is near you!");
if(GetDistanceBetweenPlayers(playerid,target) <= 2)
{
if(a > 0)
{
SetPlayerArmour(target, a-3);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp+2);
GameTextForPlayer(target, "~g~armor protecting you from infection ", 2000, 6);
}
else
{
GetPlayerHealth(target,hp);
SetPlayerHealth(target, hp-4);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp+2);
SetPVarInt(target ,"infection", 1);
GetPlayerHealth(target,hp);
}
}
else SendClientMessage(playerid, YELLOW, "Nobody is near you!");
}
|
Re: server bug if a more than 15 players conect -
Mean - 05.03.2011
No loops there.
Also, make sure your MAX_PLAYERS isn't like this
pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS (5)
And your server has 200 slots, ofc it will not work, incase you got 200 slots for example, you do
pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS (200)
Re : server bug if a more than 15 players conect -
Amine_Mejrhirrou - 05.03.2011
gonna try that tnks for hlp
Re : server bug if a more than 15 players conect -
Amine_Mejrhirrou - 06.03.2011
i've tested but nothing has change some player are " intouchbl" but not all ! only some player & i still don't know why
Re: server bug if a more than 15 players conect -
JackT - 06.03.2011
maybe your internet connection is slow and so it takes more time to recive the data or it just mixes up
Re: server bug if a more than 15 players conect -
Roomeo - 06.03.2011
I don't think so it's internet Problem it will be probally Script Problem :S i can't Help you Because i can't script :P
Re : server bug if a more than 15 players conect -
Amine_Mejrhirrou - 06.03.2011
my uploade conexion is 8 mega ! it's not internet conextion ! & that only hapen with some player ! not with all
Re: server bug if a more than 15 players conect -
bboytimix - 14.03.2011
i have this problem too