realRO Posted October 27, 2016 Posted October 27, 2016 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; } Quote
0 Emistry Posted October 27, 2016 Posted October 27, 2016 i think you can try something like this. https://pastebin.com/Dc0GC7fB use strpos to find the position of the tag you mentioned. Quote
0 realRO Posted October 30, 2016 Author Posted October 30, 2016 (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 November 6, 2016 by Emistry Quote
Question
realRO
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:
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.