Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM4 PLUGIN] Domination Release 1.0
Re: [SSGM4 PLUGIN] Domination Release 1.0 [message #464710 is a reply to message #464125] Tue, 20 March 2012 15:12 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
I was interested in setting the team score so I attempted to track down the cTeam::Set_Score() function in the Windows FDS with success.

I'm not sure about the side-effects my function has but if you want you can try using the following Set_Team_Score() function to set the team score for a team:

RENEGADE_FUNCTION
char *Find_Team(int team)
AT2(0x0041DA10,0x0041DA10);

void Set_Team_Score(int team, float score)
{
	char* cTeam = Find_Team(team);
	_asm
	{
		mov ecx, cTeam
		push score
		mov ebx, 0x41C900
		call ebx
	}
}


You'll have to call the function for both teams whenever a player joins, it doesn't set the proper score with this method until the score changes after the guy joins for some reason. You need to add the following in a player join hook:

void Toys::OnPlayerJoin(int PlayerID,const char *PlayerName)
{
	Set_Team_Score(1, Get_Team_Score(1));
	Set_Team_Score(0, Get_Team_Score(0));
}


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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [MAP] C&C_Nod_Invasion
Next Topic: [MAP] C&C_Tropical
Goto Forum:
  


Current Time: Sun Dec 22 05:09:42 MST 2024

Total time taken to generate the page: 0.00654 seconds