GTA-RP -
Gigi-The-Beast - 30.05.2010
Hello to all
Can anybody tell me whats wrong with gta-rp? when about 35-40 people connects to my server, the server starts to lagg ( the problem isn't with host )
What should i do to decrease the lag?
Thanks
Re: GTA-RP -
Conroy - 30.05.2010
Decrease array sizes.
Re: GTA-RP -
DJDhan - 30.05.2010
Quote:
Originally Posted by Conroy
Decrease array sizes.
|
Also, try to reduce timers as much as possible. Maybe combine timers into one timer if possible.
Re: GTA-RP -
Gigi-The-Beast - 30.05.2010
well, i don't have much timer, maybe 8-10
Re: GTA-RP -
DJDhan - 30.05.2010
Quote:
Originally Posted by Gigi-The-Beast
well, i don't have much timer, maybe 8-10
|
Even if you don't have many timers, if they are set to less time(eg:1-3 seconds), they can cause lag.
Re: GTA-RP -
Gigi-The-Beast - 30.05.2010
adtimer = SetTimer("Advertisements", 120000, 1);
synctimer = SetTimer("SyncUp", 60000, 1);
unjailtimer = SetTimer("SetPlayerUnjail", 1000, 1);
othtimer = SetTimer("OtherTimer", 1000, 1);
pickuptimer = SetTimer("CustomPickups", 1000, 1);
cartimer = SetTimer("CarCheck", 30000, 1);
spectatetimer = SetTimer("Spectator", 5000, 1);
idletimer = SetTimer("IdleKick", idletime, 1);
productiontimer = SetTimer("Production", 300000, 1); //5 mins (300000)
accountstimer = SetTimer("SaveAccounts", 300000, 1); //5 mins every account saved
checkgastimer = SetTimer("CheckGas", RunOutTime, 1);
stoppedvehtimer = SetTimer("StoppedVehicle", RunOutTime, 1);
checkcarhealthtimer = SetTimer("CheckCarHealth", 10000, 1);
tracetimer = SetTimer("TraceLastCall", 300000, 1);
SetTimer("GunTimer", 5000, 1);
ups, there are 14 timers

so what's your proposal? what should i do here?
Re: GTA-RP -
Conroy - 30.05.2010
The problem is with your host. Bigger array sizes and so many timers that occur at the same time requires larger resources, and if you're getting lag then your host doesn't have enough resources.
Re: GTA-RP -
Gigi-The-Beast - 30.05.2010
i am hosting at serverffs...
i could only get a better host by buying a dedicated server
Re: GTA-RP -
Conroy - 30.05.2010
Well go through your arrays, make sure they are the smallest size possible. No 256's!
Re: GTA-RP -
Gigi-The-Beast - 30.05.2010
so how large should i make them?

and they really can make so much lag?