View Single Post
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 02-01-2008 , 15:38   Re: Buy Menu v1.2 [UPDATED]
Reply With Quote #9

This is just insane each 0.1 sec you make a loop that set sv_maxspeed to 1000 and you do that Times*players on server.
and not only that you change thare maxspeed aswell this shuld lagg as XXX or krash the server.

PHP Code:
public plugin_init() {
set_task(0.1,"fast",0,"",0,"b")
}
 
public 
fast() 

 for(new 
i=0;i<=32;i++) 
 { 
  if(
is_user_connected(i)) 
  { 
   if(
speed[i]) 
   { 
    
server_cmd("sv_maxspeed 1000"
    
set_user_maxspeed(i,1000.0
   } 
  } 
 } 
 return 
PLUGIN_HANDLED 

so if 30 players are playing then you do server_cmd("sv_maxspeed 1000")
30times each 0.1 sec
300times each 1.0sec
but you did at least cheek if speed was 0 so not 300 times each second but its still god dam high
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 02-01-2008 at 15:44.
fxfighter is offline
Send a message via MSN to fxfighter