View Single Post
finishlast
Senior Member
Join Date: Nov 2018
Location: In Reno with the vitamin D.
Old 02-25-2022 , 09:22   Re: Rename players to prevent taking CLAN tag
Reply With Quote #4

Oh that is almost the thing I need.

For some reason it is bugging out if an admin tries to rename himself.

It adds the tag again, if you use utf8 character and rename 3 time LILAC kicks you bc of characters in name

I guess you have to strip the TAG no matter what innitially to make sure its not already set.

PHP Code:
void GiveAdminTag(int client) {
    
char strNickname[156];
// get the name here somehow
//strip tag
//format that with TAG
    
Format(strNicknamesizeof(strNickname), TAG ... TAG_SPACE ... "%N"client);
    
g_bNameChanged[client] = true;
    
SetClientName(clientstrNickname);

That readds the tag every time an admin tries to rename himself, would need the stripping inside it somehow.
__________________

Last edited by finishlast; 02-25-2022 at 09:25.
finishlast is offline