Thread: Ping
View Single Post
  #1  
Old 04-11-2009, 09:24 PM
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
Ping

Stumbled upon this today, Enjoy! Although a player.ping variable that would auto-update itself would be niftier but this can get us pretty close.

Scripthelp Docs: TServerPlayer.sendping() - returns object - pings the player, returns a request object which will get an onReceivePing(time) event (use catchevent() on the object)

PHP Code:

function onGPing(acct) {
  
temp.obj findplayer(acct).sendping();
  
this.catchevent(obj"onReceivePing""onGPingReply");
}

function 
onGPingReply(objplyrtime) {
  echo(
plyr.account SPC int(time 1000) @ "ms");

__________________
Quote:
Reply With Quote