Jump to content
  • 0

Create a personal name


John Key

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  73
  • Reputation:   0
  • Joined:  07/23/12
  • Last Seen:  

How can I prevent players from creating a characters in the name of "GM"

Example : GM.name , GMname , GM-name , GM name , GM!name

I do not want players to create characters in the name of "gm"

please help and thx

---

where are you ?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Index: char/char.c
===================================================================
--- char/char.c (revision 16496)
+++ char/char.c (working copy)
@@ -1322,6 +1322,8 @@
 }
 if( Sql_NumRows(sql_handle) > 0 )
 return -1; // name already exists
+ if (strstr(name, "GM"))
+ return -2;

 return 0;
}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

I doubt there's a way to do so.. unless you disable letters G-M when creating a character. The only way I can find a solution for this is if you tell your players that your GMs are separated with lets say <GM> [Name]. Thus, players who are named GMname are fake and scammers.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  139
  • Reputation:   2
  • Joined:  07/05/12
  • Last Seen:  

just make a announce.. put all the GM team on same guild.. ex: [GM] GameMaster << [GM] will be the emblem.. other than that guild member is a scammer :D i do that on my previous server :P

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you can try something this like...but still it is not a good way to do so..since player's name might come with those word without any intention to act as "GM"


OnPCLoginEvent:
if( compare( strcharinfo(0),"[GM]" ) ){
mes "Sorry you cant add any form of '[GM]' in your name.";
sleep2 5000;
atcommand "@kick "+strcharinfo(0);
}
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  73
  • Reputation:   0
  • Joined:  07/23/12
  • Last Seen:  

Where do I put these codes?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Index: char/char.c

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Where do I put these codes?

In other words, .../src/char/char.c https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/src/char/char.c

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...