Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Learn me good!
Re: Learn me good! [message #411264 is a reply to message #411245] Wed, 18 November 2009 07:14 Go to previous messageGo to previous message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma:
Colonel
If its just for the Nod rocket soldier just update the score on death?

	if(strstr(Commands->Get_Preset_Name(o),"CnC_Nod_RocketSoldier_1Off"))
	{
		for (GenericSLNode* PlayerIter = PlayerList->HeadNode; (PlayerIter != NULL); PlayerIter = PlayerIter->NodeNext)
		{
			cPlayer *p = (cPlayer *)PlayerIter->NodeData;

			if (!p->IsActive)
			{
				continue;
			}
			if (p->PlayerId == Get_Player_ID(killer))
			{
				int NewScore = p->Score.Get() + xxx /*score you want to add or character*/; 
				p->Score.Set(NewScore);
			}
		}
	}


This would work for a single character or for any you wanted to do if you want to do it for all characters you could do something like

int GetKillPoints(const char *Preset)
{	
	int Points = 0;

	if (stricmp(Preset,"CnC_Nod_RocketSoldier_1Off") == 0) Points = xxx;
	else if (stricmp(Preset,"CnC_GDI_Grenadier_2SF") == 0) Points = xxx;
	return Points;
}


and

GetKillPoints(Commands->Get_Preset_Name(o))



Hex


goztow wrote on Tue, 11 May 2010 08:00

If we had to ban all who ever cheated or ever created a cheat (obj3cts and such) then I don't think there would be many members left here (sad fact).


reborn wrote on Fri, 29 January 2010 23:37

std is for pro's. Razz
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: request - Nod Rocket Soldier bug
Next Topic: music not working for map
Goto Forum:
  


Current Time: Mon Dec 23 15:29:14 MST 2024

Total time taken to generate the page: 0.01015 seconds