Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script Samepl#gm_name_block -1,{
- OnInit:
- .gm_name_prefix$ = "[GM]";
- setarray .banned_name$,
- "GM",
- "[GM]",
- "Admin",
- "G M",
- "[Admin]",
- "A dmin";
- .banned_name_size = getarraysize( .banned_name$ );
- end;
- OnPCLoginEvent:
- .@nickname$ = strcharinfo(0);
- .@gm_level = getgmlevel();
- for ( .@i = 0; .@i < .banned_name_size; .@i++ ) {
- .@strpos = strpos( .@nickname$, .banned_name$[.@i], 0 );
- if ( .@strpos != -1 ) {
- if ( .@gm_level > 0 ) {
- if ( strpos( .@nickname$,.gm_name_prefix$,0 ) != 0 ) {
- query_sql( "UPDATE `char` SET name='"+.gm_name_prefix$+" "+.@nickname$+"' WHERE `account_id` = "+getcharid(3) );
- mes "You have to relog to update your nickname to have ^FF0000"+.gm_name_prefix$+"^000000 tag";
- }
- }
- else {
- atcommand "@block "+.@nickname$+"";
- }
- break;
- }
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement