![]() |
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:
|
That's pretty neat. I actually wasn't aware of sendping();
|
Yeah, nice find. :)
|
Stumbled upon it when i was looking for the docs for catchevent.
I guess Stefan snuck it in during the NPC-Server update but the documentation for is a little over since it has 3 parameters instead of 1. |
Nice job Dude.
|
Quote:
|
I thought thread bumping was allowed in the code gallery?
Since some people might find an old thread useful. |
Quote:
|
pinging yourself should be available to all server :)
i already added it to Testbed (Shared/Ping) and UN already has it. |
So how exactly do you set this up? :x
Tried using player chat to trigger to server, then echo it in rc with those 2 functions, sending it to the first one first, nothing is happening. Help this simpleton out plz. |
Something like this should work.. You'll need to modify it to your needs though.
PHP Code:
|
cool, thanksers.
|
Still trying to get the hang of this. So i gotta ask.
where are the results stored so i can send them to the clientside? sending temp.obj doesnt seem to be it. |
HTML Code:
function onGPingReply(obj, plyr, time) { |
Quote:
|
All times are GMT +2. The time now is 08:37 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.