Posts: 90
Threads: 16
Joined: Aug 2010
Reputation:
0
Like the title, can you tell me the causes of lag. I know its the script, but im not sure exactly what to look for, ive condensed all the loops into one that i can, i thought it could be the vehicles, or maybe even the objects, so can you tell me what might be the problem?
Posts: 1,571
Threads: 49
Joined: Dec 2009
Reputation:
0
Repeating timers calling slow codes and functions.
Posts: 90
Threads: 16
Joined: Aug 2010
Reputation:
0
what are some things you can do for robbing and stuff, without using timers?
Posts: 8
Threads: 0
Joined: Oct 2011
Reputation:
0
What kind of robbing like a player or like a mini mission
Posts: 90
Threads: 16
Joined: Aug 2010
Reputation:
0
a rob like attempt robbery, then a counter goes down for the amount of time left until your done robbing
Would 318 objects make it lag?
Posts: 8
Threads: 0
Joined: Oct 2011
Reputation:
0
Chrism add a Streamer are they createobject .... or createdynamicobject
Posts: 90
Threads: 16
Joined: Aug 2010
Reputation:
0
createdynamicobject and 38 createobject, but my reason for this is, im a scripter for a samp server, and i need to know how to fix the lag, i can fix it if i can find out what causes there can be. it seems to be getting worse and we cannot give any parts of the script out, says the owner, as im sure you understand
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Main reasons are:
- OnPlayerUpdate
- OnPlayerUpdate
- OnPlayerUpdate
- Fast timers
- Slow functions
- Unoptimized or unnecessary loops
- Poorly optimized code (e.g. using floatmul, floatsub, etc for calculations)
Posts: 90
Threads: 16
Joined: Aug 2010
Reputation:
0
ok, well would the objects effect it much?