Thread: Ping
View Single Post
  #11  
Old 12-11-2009, 05:39 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Something like this should work.. You'll need to modify it to your needs though.

PHP Code:
function onActionServerSide() {
  switch (
params[0]) {
    case 
"ping":
      
getPing();
      break;
  }
}

function 
getPing() { 
  
temp.obj player.sendping(); 
  
this.catchevent(obj"onReceivePing""onGPingReply"); 


function 
onGPingReply(objplyrtime) { 
  
plyr.chat int(time 1000) @ "ms";
}

//#CLIENTSIDE

function onCreated() {
  
getPing(player.account);
}

function 
getPing() {
  
triggerserver("gui"name"ping");

__________________
Quote:
Reply With Quote