EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Updated #size code (https://www.eqemulator.org/forums/showthread.php?t=671)

DaRacne Shaitan 03-09-2002 04:42 PM

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


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


All times are GMT -4. The time now is 05:19 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.