SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 01/08/2009, 12:57 AM   #1
JonathanRulez09
Little Clucker
 
Join Date: Jul 2009
Posts: 11
Reputation: 0
Default Help? Timeouts?

Hello, I have recently started hosting a server from my computer. I don't have the money for a host.
But lets get to my problem, Alot of times what I find happening is people will time out alot. Is there anyway I can reduce lag \ stop time outs from happening as much? I know its not my computer because I have massive space. I am using the stunt universe game mode (with my little added things)
Sometimes even I will go to login and it will say lost connection reconnecting.And then it will crash. Why is this?
JonathanRulez09 is offline   Reply With Quote
Old 01/08/2009, 05:21 PM   #2
Rizard
Huge Clucker
 
Join Date: Jun 2008
Posts: 307
Reputation: 0
Default Re: Help? Timeouts?

Option 1:

kick players with ping higher then 300?
pawn Code:
public PingKick()
{
      for(new i = 0,string[256],name[24]; i < MAX_PLAYERS; i++)
      if(IsPlayerConnected(i) && (GetPlayerPing(i) > 300))
  {
            GetPlayerName(i,name,24); format(string,256,"\"%s\" has been kicked from the server. (Reason: High Ping || Max Allowed: %d)",name,Config[MaxPing]);
            SendClientMessageToAll(yellow,string); Kick(i);
      }
}
This needed at beginning of script :
pawn Code:
forward PingKick();
And this in 'OnGameModeInit()' :
pawn Code:
SetTimer("PingKick",10000,true); // gonna check every 10 seconds for to high ping

*CREDITS XTreme (taken from his xadmin FS)

Option 2:
Blame your parents/provider/internet product for the bad connection peeps having on your server.

Hopefully for you there are more experienced users with other options


Ps: first 'code' post so correct my mistakes pls




Rizard is offline   Reply With Quote
Reply

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
All pings the same / causing timeouts lolumadd Server Support 14 17/12/2009 01:39 AM
All pings the same / causing timeouts lolumadd Help Archive 3 12/12/2009 10:50 AM
Timeouts are caused by admins. James505 Server Support 17 17/08/2009 09:39 PM
How to bypass timeouts *READ* James505 Server Support 5 17/08/2009 04:06 PM
[TUTORIAL] Correct MAX_PLAYERS: gMaxPlayers. Reduced timeouts. illay Filterscripts 10 05/07/2009 08:35 AM


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


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