GTA-RP
#1

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
Reply
#2

Decrease array sizes.
Reply
#3

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.
Reply
#4

well, i don't have much timer, maybe 8-10
Reply
#5

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.
Reply
#6

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?
Reply
#7

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.
Reply
#8

i am hosting at serverffs...
i could only get a better host by buying a dedicated server
Reply
#9

Well go through your arrays, make sure they are the smallest size possible. No 256's!
Reply
#10

so how large should i make them? and they really can make so much lag?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)