Raised This Month: $ Target: $400
 0% 

Name prefix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
A1ekin
Member
Join Date: Jul 2021
Old 08-20-2022 , 01:42   Name prefix
Reply With Quote #1

hello everyone, I'm looking for a way to add a prefix to the player's name (admin or vip player) in the chat, on my server left 4 dead 2

does anyone know how this can be done?
A1ekin is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 08-20-2022 , 03:49   Re: Name prefix
Reply With Quote #2

like this?
https://forums.alliedmods.net/showthread.php?p=2737572
__________________
Grey83 is offline
A1ekin
Member
Join Date: Jul 2021
Old 08-20-2022 , 11:02   Re: Name prefix
Reply With Quote #3

Quote:
Originally Posted by Grey83 View Post
seems to be yes

today I will check on my server
Thanks
A1ekin is offline
A1ekin
Member
Join Date: Jul 2021
Old 08-20-2022 , 11:11   Re: Name prefix
Reply With Quote #4

Code:
L 08/20/2022 - 18:06:00: SourceMod error session started
L 08/20/2022 - 18:06:00: Info (map "c8m1_apartment") (file "/home/steam2/steamcmd/l4d2/left4dead2/addons/sourcemod/logs/errors_20220820.log")
L 08/20/2022 - 18:06:00: [SM] Unable to load plugin "Admin_tags.smx": Required extension "cstrike" file("games/game.cstrike.ext") not running
L 08/20/2022 - 18:06:09: Error log file session closed.
unfortunately it doesn't work for left 4 dead 2, it tries to find extension for cstrike
A1ekin is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 08-20-2022 , 12:34   Re: Name prefix
Reply With Quote #5

A1ekin, do you have any chatprocessor on your server?
__________________
Grey83 is offline
LinLinLin
Senior Member
Join Date: Sep 2021
Old 08-20-2022 , 13:46   Re: Name prefix
Reply With Quote #6

Code:
public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs)
{
    //PrintToChat(client,sArgs[strlen(sArgs)-1]);
    if(vip)
    {
        char prename[128];
        Format(prename,sizeof(prename),"[Your Prefix]%N",client);
        Handle msg = StartMessageAll("SayText2");
        
        BfWriteByte(msg,client);
        BfWriteByte(msg,true);
        BfWriteString(msg,"L4D_Chat_All");
        BfWriteString(msg,prename);
        BfWriteString(msg,sArgs);
        BfWriteString(msg,"");
        BfWriteString(msg,"");

        EndMessage();
        return Plugin_Stop;
    }
    return Plugin_Continue;
}
test in 1.10sm and work well.
LinLinLin is offline
A1ekin
Member
Join Date: Jul 2021
Old 08-20-2022 , 15:54   Re: Name prefix
Reply With Quote #7

I found and already made this plugin work
Thanks to all who responded
https://forums.alliedmods.net/showthread.php?p=2566623
A1ekin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode