Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM Plugin] Ping
[SSGM Plugin] Ping [message #488984] Mon, 11 August 2014 00:52 Go to next message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
This is a very simple SSGM plugin that allows you to check your ping or check other players' pings.

[Plugins]
00=BanSystem.dll
01=Mute.dll
02=Ping.dll



  • Attachment: Ping.rar
    (Size: 10.51KB, Downloaded 111 times)

[Updated on: Mon, 11 August 2014 12:53]

Report message to a moderator

Re: [SSGM Plugin] Ping [message #488988 is a reply to message #488984] Mon, 11 August 2014 02:49 Go to previous messageGo to next message
Neijwiert is currently offline  Neijwiert
Messages: 124
Registered: October 2009
Karma: 0
Recruit
You can replace this construction: "Find_Player(Get_Player_Name_By_ID(PlayerID))->Get_GameObj();" with this "Get_GameObj(PlayerID)". Which is also fail-safe and a shorter line Very Happy

EDIT:
also im pretty sure Get_Player_Name_By_ID causes a memory leak. becouse it creates a new char array and probably uses WideCharToChar engine call.

[Updated on: Mon, 11 August 2014 02:51]

Report message to a moderator

Re: [SSGM Plugin] Ping [message #488989 is a reply to message #488988] Mon, 11 August 2014 06:22 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
Neijwiert wrote on Mon, 11 August 2014 05:49


also im pretty sure Get_Player_Name_By_ID causes a memory leak. becouse it creates a new char array and probably uses WideCharToChar engine call.



It does. You're better off using something like

GameObject *sender = Get_GameObj(PlayerID);
Get_Wide_Player_Name(sender));


http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
Re: [SSGM Plugin] Ping [message #488993 is a reply to message #488984] Mon, 11 August 2014 07:34 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Congratualtions and well done on making a public release! Thumbs Up


Re: [SSGM Plugin] Ping [message #488997 is a reply to message #488989] Mon, 11 August 2014 12:54 Go to previous message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
Xpert wrote on Mon, 11 August 2014 06:22

Neijwiert wrote on Mon, 11 August 2014 05:49


also im pretty sure Get_Player_Name_By_ID causes a memory leak. becouse it creates a new char array and probably uses WideCharToChar engine call.



It does. You're better off using something like

GameObject *sender = Get_GameObj(PlayerID);
Get_Wide_Player_Name(sender));


Fixed, re-uploaded, and thanks for the advice. Smile

[Updated on: Mon, 11 August 2014 12:55]

Report message to a moderator

Previous Topic: [SSGM Plugin] Donate
Next Topic: [SSGM Plugin] Command
Goto Forum:
  


Current Time: Tue Jun 18 01:47:02 MST 2024

Total time taken to generate the page: 0.00637 seconds