- else if (strcmp(command,"gmtag")==0) /* - Made by FransH - adds a gm tag - Relog needed*/
- {
- if(Config.Command_Ban > thisclient->Session->accesslevel) //*Works on acceslevel of ban so you don't have to change headers
- return true;
- char newcharname[65];
- strcpy (newcharname,"[GM]"); //Change this value if you want
- strcat (newcharname, thisclient->CharInfo->charname);
- GServer->DB->QExecute(" UPDATE characters SET char_name = '%s' WHERE id = '%i' ",newcharname, thisclient->CharInfo->charid);
- }
I've made this section just because I haven't seen one in here, this is the place you can give your command scripts for open use to servers
Adds a [GM]Tag in front of the users name - Coded by FransH
We have /rules, but not /gmrule, this shows the basic rules for (Starter) gm's. - Main code by Matt and edited by FransH for other use.
- else if (strcmp(command, "gmrules")==0) //Main code by Matt, edited by FransH.
- {
- if(Config.Command_ban > thisclient->Session->accesslevel)//works on ban so no need to edit headers!
- return true;
- SendPM(thisclient, "Follow these rules or you might lose your acceslevel!"); //Change these if you like
- SendPM(thisclient, "Rule 1: Do not give items to other (normal) players");
- SendPM(thisclient, "Rule 2: Don't abuse your powers");
- SendPM(thisclient, "Rule 3: Respect the administrators");
- SendPM(thisclient, "Rule 4: No spawning of any monsters in any towns");
- SendPM(thisclient, "Rule 5: Don't teleport people for fun");
- SendPM(thisclient, "~ADMINS CAN DECIDE IF IT IS OKAY AT ALL TIME~.")
- }
So, where should I place them, then?
Placing these codes is easy, every new command starts with like
- else if (strcmp(command, "gmrules")==0)
-------------------------------------------------------------------------
Updates:
Fixed a code starting out with half words (Copy-mistake)
Added 'where to place' section
-------------------------------------------------------------------------
We are looking for new codes, help the community and reply with the code uploaded in mediafire as a .txt in a .rar - Thank you