Forums Index >> Modding >> Ping Hud - Get it here!



Page : <1> :


Well, I scripted a 5-minute PingHud Wingman's style (didnt use his code).
It is configured to snap-in to Wingman's script (yes, I'm a wingman's script addict), but in-case it doesnt exist it knows how to adjust itself ;)

Linky (right click + save as)

Instructions:
Save the file to game/client/scripts, then add these lines to the main.cs in the main ThinkTanks folder:

 

                                        
if(!$Server::Dedicated)
exec("game/client/scripts/pinghud.cs");

 

PS: I noticed it keeps giving like 40 ping in my own server, while the /ping command gives only 1 or 2. It probably is caused because this is the ping from me to the server, while the /ping command is from the server to me. I'm not sure though. Anyways, it does work so download it now!


Last edited: Friday, June 30, 2006 at 9:13:41 AM

Thursday, June 29, 2006 at 1:35:36 PM

Woops! Ty Rep, I'm a bit sleepy, going to bed now too :P


Thursday, June 29, 2006 at 2:20:25 PM

Now he goes through with my request, Which took 5 minutes XD

Thanks Ac.

 

 

 

 

Thursday, June 29, 2006 at 2:22:57 PM

Now I remembered, it MAY not work on macs... Didnt make a compiled version for it... Test it anyways, it might work :)

Btw, only now do I know a good way of doing the script... So thats why I only did it today :P

Gtg sleep! Cyall!


Last edited: Thursday, June 29, 2006 at 2:27:27 PM

Thursday, June 29, 2006 at 2:26:48 PM

Thank you Art!

 

 

 

 

Thursday, June 29, 2006 at 9:39:09 PM

WOOT. Been waiting a while for this.

<--- is a Wingman script addict.

Thursday, June 29, 2006 at 9:58:15 PM

Yep, it worked as soon as I installed it Ac, No teething problems at all. It also refreshes as frequently as my FPS.

 

 

 

 

Last edited: Thursday, June 29, 2006 at 10:49:34 PM

Thursday, June 29, 2006 at 10:48:56 PM

I seem to have the same issue with the ping being off some.

Found this is the console also:

Game/client/scripts/pinghud.cs (30): Unable to find object: 'ServerConnection' a ttempting to call function 'getPing'

To bad its a.dso

 

Friday, June 30, 2006 at 6:17:36 AM

Good you all liked it :)
I'm working on a more complicated project now though... :P

@NUTS
Well, everyone does have the "ping-off" issue... I think its because this way its a client-server ping, instead of a server-client ping. Client has heavier connections to the server than the server to the client, so it might be it.
Did that line keep repeating itself? It shouldnt o.O

EDIT: Check first post for a fix to the exec code, it was caused because "ServerConnection" signals the connection from client to server, and as obvious doesnt exist in a dedicated server, only when you play a game


Last edited: Friday, June 30, 2006 at 9:01:06 AM

Friday, June 30, 2006 at 6:18:58 AM


 

                                        
$pingEn = false;
function startPingDaemon(%this)
{
$pingEn ~= $pingEn;
if ($pingEn)
pingDaemon(%this);
}
function pingDaemon(%this)
{
%ping = ServerConnection.getPing();
clientCmdCenterPrint(%ping, 1, 1);
if ($pingEn)
schedule (100, 0, pingDaemon, %this);
}
moveMap.bind(keyboard,"p",startPingDaemon,%this);

 

Something like that?
PS: I checked the TGE code, and guess what? There's a client -side centerPrint code.

Last edited: Saturday, July 01, 2006 at 5:12:54 AM

Friday, June 30, 2006 at 10:42:00 AM

Almost nothing equals your script :P
Using variable != variable is only for if statements, and variables must be marked with % or $ (first temporary and second permanent). Theres also no CenterPrint server command ;)
Then, the hardest part of all is putting them into the playgui...


Friday, June 30, 2006 at 12:40:41 PM

I'll give it another go a bit later.

As for the playGui can't you just pull it out of the game legends? Since it has it owns wingmans script?

 

Friday, June 30, 2006 at 5:26:43 PM

I am pretty sure that is not possible as the play gui contains all the other gui info for TT like cp, bp, timer, player names etc etc :[

 

 

 

 

Saturday, July 01, 2006 at 8:20:48 AM

^ Dazz and I should be sure we were studying that stuff for hours.... You can get a bit from the.dsos though, I do have a bunch of GG source files like centerprint and some of the GG admin stuff I could email it to you if you want.

Saturday, July 01, 2006 at 9:35:59 AM

@testify
call the function like its named, as to use a clientCommand you HAVE to be the server, unless you call the function right away (like clientCmdCenterPrint("hi",4,4); )


Thursday, July 06, 2006 at 9:12:47 AM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald