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