Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Server Side Stuff
Re: Server Side Stuff [message #256540 is a reply to message #255939] Mon, 30 April 2007 12:58 Go to previous messageGo to previous message
Genesis2001
Messages: 1397
Registered: August 2006
Karma:
General (1 Star)
using namespace std;
void Remove_Weapon_Player (GameObject *obj,const char *Weapon_Name){
	int Number_Weapon = Get_Weapon_Count(obj);
	string Current_Weapon;
	int Location; 
	for (int i = 1; i <= Number_Weapon; i++) {
	   Current_Weapon = Get_Weapon(obj,i);
	   if (Current_Weapon.find(Weapon_Name)>= 0) {
	      Location = Current_Weapon.find("Weapon");
	      if (Location >= 0) Current_Weapon.replace(Location,6,"POW");
	      Commands->Give_Powerup(obj,Current_Weapon.c_str(),true);
	   }
	}
}



A little bit of a more efficient code. (Yes, I do know that you were in a rush, but heck...Just thought I'd interject this.)


-Thanks,
MathK1LL


EDIT: Btw...darksnipa, do you know ANY C++ or even know how to modify the server scripts? Just a thought that came my way...

[Updated on: Mon, 30 April 2007 12:59]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: scorpia's wwconfig2
Next Topic: Level Edit bug
Goto Forum:
  


Current Time: Sat Jan 25 02:12:27 MST 2025

Total time taken to generate the page: 0.01485 seconds