PDA

View Full Version : Updated #size code


DaRacne Shaitan
03-09-2002, 04:42 PM
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).

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);
}
}
}

mByte
03-09-2002, 05:47 PM
yea on my server you can only change yourself or NPC's
but you need GMstatus or higher