Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Leave Deaths Exploit Fix
[SSGM 4.0 Plugin] Leave Deaths Exploit Fix [message #472006] Fri, 20 July 2012 02:59
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma: 0
General (4 Stars)
This plugin fixes an exploit where if you leave the game after dying but before respawning your death count doesn't get incremented. The following simple code is used:

void LeaveDeathsExploitFix::OnPlayerLeave(int PlayerID)
{
	GameObject *obj = Get_GameObj(PlayerID);

	if ( Commands->Get_Health(obj) == 0.0f ) 
	{ 
		Find_Player(PlayerID)->Set_Deaths(Find_Player(PlayerID)->Get_Deaths()+1); 
	}
}


To install place 'LeaveDeathsExploitFix.dll' inside the root FDS and add an entry for it under [Plugins] in SSGM.ini.

You can contact me on renegadeforums.com under the nick 'iRANian'.


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Fri, 20 July 2012 03:00]

Report message to a moderator

Previous Topic: [SSGM 4.0 Plugin] Restore Weapons Characters on Join
Next Topic: [SSGM 4.0 Plugin] Custom Kill Messages ALPHA
Goto Forum:
  


Current Time: Sat Dec 21 07:51:32 MST 2024

Total time taken to generate the page: 0.00650 seconds