Jump to content
  • 0

Help about antigm-name script


Question

Posted

Can someone help me to revise this script?

The problem is, when people try to make name with G and M chronological, they got blocked instantly.

 

example: 

 

1. Character creates a name like: "Bag Man"

The script reads their character name with G M <<< "Bag Man" and automatically blocks them.

How to fix this? Thanks

 

Here's my script:

-	script	gmrenamer	-,{
     
    OnPCLoginEvent:
    set .nickname$,strcharinfo(0);
    setarray .banned$[0],"GM","[GM]","Admin","G M","[Admin]","A dmin";
    set .bannedamt,getarraysize(.banned$);
            if(getgmlevel() > 0) {
                    if(compare(.nickname$,"[GM] ") == 0) {
                    query_sql("UPDATE `char` SET name='[GM] "+.nickname$+"' WHERE name='"+.nickname$+"'");
                    mes "You have to relog to update your nickname to have ^FF0000[GM]^000000 tag";
                    }
            } else {
                    for(set .a,0; .a < .bannedamt; set .a,.a+1) {
                            if(compare(.nickname$,.banned$[.a]) == 1) {
                            atcommand "@block "+.nickname$+"";
                            }
                    }
            }
            end;
     
}

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

i think you can try something like this.

https://pastebin.com/Dc0GC7fB

use strpos to find the position of the tag you mentioned.

Thanks but i have a problem.

I tried this, but i think line 25-26 is not working.

I tried making a char using group lvl 99, [GM] tag doesn't show. hmmm

Someone help me? :) Thanks! Bump!

Edited by Emistry

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...