realRO Posted October 27, 2016 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 84 Reputation: 0 Joined: 12/24/13 Last Seen: June 13, 2017 Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted October 27, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: 4 hours ago Share 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 Link to comment Share on other sites More sharing options...
0 realRO Posted October 30, 2016 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 84 Reputation: 0 Joined: 12/24/13 Last Seen: June 13, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
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:
Link to comment
Share on other sites
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.