![]() |
/Lag Command (Ping) - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: /Lag Command (Ping) (/showthread.php?tid=440) |
/Lag Command (Ping) - Tutorial Bot - 03-12-2006 Author: Dragoons Master Difficulty: 1/5 "That's pretty simple thing but I think it's pretty cool/useful stuff. It's nothing but a little ping command, just like that, it sends a packet to the server and then the server answer your ping packet with an other packet. When the client first sends the packet it stores the time value (GetTickCount) and when the client receives the packet from the server it stores this value on a variable and shows it on screen for the user. Pretty simple." :: SERVER SIDE :: In modHandleData, add: Code: ' :::::::::::::::: :: CLIENT SIDE :: In modGameLogic, under "' Used for atmosphere" add: Code: Public LAGYN As Boolean Code: ' Checking lag Code: If LAGYN = True Then Code: If LAGYN = True Then In modGlobals:, under "Public GameFPS As Long" add: Code: Public GameLAG As Long Code: ' :::::::::::::::: |