View Single Post
  #1  
Old 03-09-2002, 04:42 PM
DaRacne Shaitan
Fire Beetle
 
Join Date: Mar 2002
Posts: 21
Default Updated #size code

Well, this isn't anything big, but I got sick of people thinking they're "bad" or funny because they can keep changing the GM's size =P So I just wrote the code so they can only change the size of themselfs and mobs, and anyone who is a lower level (hopefully you trust whoever you give a higher level status to as it is).

Code:
		else if (strcasecmp(sep.arg[0], "#size") == 0 && (admin >= 20))	{
			if (!sep.IsNumber(1))
				Message(0, "Usage: #size [0 - 255]");
			else {
				float newsize = atof(sep.arg[1]);
				if (newsize > 255)
					Message(0, "Error: #size: Size can not be greater than 255.");
				else if (newsize < 0)
					Message(0, "Error: #size: Size can not be less than 0.");
				else {
					if (target && target->CastToClient()->Admin() < this->Admin() || target->CastToClient()->GetID() == this->GetID())
						target->ChangeSize(newsize);
					else if (target && target->CastToClient()->Admin() >= this->Admin())
						Message(0, "Error: #size: Your will is not sufficent to change the target's size.");
					else
						this->ChangeSize(newsize);
				}
			}
		}
__________________
-DaRacne Shaitan
Reply With Quote