quick question
#2

Quote:
Originally Posted by [SF
robmob ]
I have alot of New `s in my server like 100 and my server is using a lot of cpu when a lot of players are on . I just coded my drug system using #define , I was wondering whats better to use or if theirs a difference between using new and define what one take more memory if it dose ?
I think your problem may be with Loops, not with 'NEW's and 'DEFINE's , if you're using loops like:
pawn Код:
for(new i=0;i<MAX_PLAYERS;i++){
  if(IsPlayer....
Try changing your Loops to Foreach: Foreach By ******

The bad using of OnPlayerUpdate can cause lag as well..

Also, you may read this: Code optimisations.
Reply


Messages In This Thread
quick question - by [SF]RobMob - 19.02.2010, 16:43
Re: quick question - by wafffllesss - 19.02.2010, 16:58
Re: quick question - by [SF]RobMob - 19.02.2010, 17:03
Re: quick question - by wafffllesss - 19.02.2010, 17:12

Forum Jump:


Users browsing this thread: 1 Guest(s)