[SSGM Plugin] Ping [message #488984] |
Mon, 11 August 2014 00:52 ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/25488.jpg) |
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 125 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 message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
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](images/smiley_icons/icon_biggrin.gif)
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 #488997 is a reply to message #488989] |
Mon, 11 August 2014 12:54 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) |
![](http://renegadeforums.com/images/custom_avatars/25488.jpg) |
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](images/smiley_icons/icon_smile.gif)
[Updated on: Mon, 11 August 2014 12:55] Report message to a moderator
|
|
|