View Single Post
  #26  
Old 08-01-2007, 08:38 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by HolySheepy View Post
im avoiding servside timeouts because i was told they lag xP
...Only when you're doing a very large amount of work every .05 seconds...

And Dusty, why bother doing that if you can just do everything serverside in a DB NPC or a weapon.

PHP Code:
function onCreated() {
  
getTime();
  
timeFlags();
  
onTimeOut();
}
function 
onTimeOut() {
  
getTime();
  
timeFlags();
  
setTimer(1);
}
function 
getTime() {
  
this.t_var int(timevar2); 
  
this.t_second int(this.t_var%60); 
  
this.t_minute int((this.t_var/60)%60); 
  
this.t_hour int(((this.t_var/60)/60)%24); 
}
function 
timeFlags() {{
  
serverr.time.second this.t_second;
  
serverr.time.minute this.t_minute;
  
serverr.time.hour this.t_hour;
  
serverr.time.stamp getTimeStamp();
}
public function 
getTimeStamp() {
  if (
serverr.time.second == NULL
    
temp.second "0";
  else 
    
temp.second serverr.time.second;
  if (
serverr.time.minute == NULL
    
temp.minute "0";
  else 
    
temp.minute serverr.time.minute;
    
  if (
serverr.time.hour == NULL) {
    
temp.hour 12;
    
temp.hour temp.hour ":" temp.minute ":" temp.second "AM";
  }
  
  else if (
serverr.time.hour 12) {
    
temp.hour serverr.time.hour-12;
    
temp.hour temp.hour ":" temp.minute ":" temp.second "PM";
  }
  
  else 
temp.hour serverr.time.hour ":" temp.minute ":" temp.second "AM";
  
temp.timestamp serverr.time.month SPC serverr.time.day ", " serverr.time.year SPC temp.hour SPC "CST";
  
  return 
temp.timestamp;

Ziro originally showed me how to do those time calculations, but I lost 'em a while back and I had to figure it out on my own.

Anyways...
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote