Thread: Latency?
View Single Post
  #6  
Old 06-02-2006, 02:16 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
That script is horribly formatted :x

Could probably have the same effect with something like:

PHP Code:
function onActionServerside() {
  if(
params[0] == "ping") {
    
player.triggerclient("gui""WEAPONNAME""pingreturn");
  }
}

//#CLIENTSIDE
function onActionClientside() {
  if(
params[0] == "pingreturn") {
    
client.ping timevar2 this.ping_sendtime;
  }
}

public function 
GetPing() {
  
this.ping_sendtime timevar2;
  
triggerserver("gui""WEAPONNAME""ping");

This sets the client.ping to their ping time. Untested, but should work.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote