AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HL1 Servers (HLDS) (https://forums.alliedmods.net/forumdisplay.php?f=131)
-   -   [Solved] How to Add Level tag in Chat (https://forums.alliedmods.net/showthread.php?t=281623)

real sap 04-16-2016 00:31

[Solved] How to Add Level tag in Chat
 
HI .. all i am running zp 4.3 mod with zp_buymenu
i need that players can see each other levels in chat eg

{LVL 24}[VIP]sap : Hi all
{LVL 20}abc : hi all
{LVL 24}sap: Hi all in chat

I cant change my buymenu its private
Anyone any changes in zp.sma or any plugin

real sap 04-18-2016 10:50

Re: How to Add Level tag in Chat
 
Bump !!!!!! I dont think is this as Impossible or Tuff

fysiks 04-18-2016 19:52

Re: How to Add Level tag in Chat
 
FYI, see this (the third bullet point in particular).

real sap 04-19-2016 06:08

Re: How to Add Level tag in Chat
 
Quote:

Originally Posted by fysiks (Post 2412200)
FYI, see this (the third bullet point in particular).

ok sorry for that... can you help me in this ?

tousif 04-21-2016 07:37

Re: How to Add Level tag in Chat
 
This isnt hlds related issue. Please post in suggestions / request .

real sap 04-21-2016 12:42

Re: How to Add Level tag in Chat
 
Quote:

Originally Posted by tousif (Post 2412845)
This isnt hlds related issue. Please post in suggestions / request .

thats the reason this forum goes Down no required help only Rules n etc talk

gabuch2 04-21-2016 14:14

Re: How to Add Level tag in Chat
 
lol

siriusmd99 04-22-2016 14:01

Re: How to Add Level tag in Chat
 
Give me native names and i will make it for you

like :
native get_user_level(id)
native get_user_vip(id)

OR if your vip has special flag like "t" or "v" then say which flag you have set to vip.

real sap 04-22-2016 23:46

Re: How to Add Level tag in Chat
 
HERE IS MY level system natives


native zp_get_user_level(id)

native zp_set_user_level(id, value)


I use Admin flag H for vips items + knife + zm etc

Basically I want to show players levels in chat i am already using admin prefixs And really apreciate your reply and Help .:)

siriusmd99 04-24-2016 13:52

Re: How to Add Level tag in Chat
 
Here we go:

PHP Code:


#include <amxmodx>

native zp_get_user_level(id);

new const 
g_Prefix[9] = "^x04[VIP]";

public 
plugin_init()
{
    
    
register_plugin("VIP and Level Prefix""1.0""siriusmd99")
    
register_message(get_user_msgid("SayText"),"handle_chat");
    
}

public 
handle_chat(msgIdmsgDestmsgEnt){
    
    new 
id get_msg_arg_int(1);
    
    if(!
is_user_connected(id)) 
            return 
PLUGIN_HANDLED;

        new 
szLevel[9], 
        
szTmp[256],
        
szTmp2[256];
        
        
        
get_msg_arg_string(2szTmpcharsmax(szTmp));
        
formatex(szLevelcharsmax(szLevel), "^x04[%d]"zp_get_user_level(id))
        
        if(!
equal(szTmp"#Cstrike_Chat_All")){
            
            
add(szTmp2charsmax(szTmp2), szLevel);
            
add(szTmp2charsmax(szTmp2), " ");
            
            if(
get_user_flags(id) & ADMIN_LEVEL_H){
                
add(szTmp2charsmax(szTmp2), g_Prefix);
                
add(szTmp2charsmax(szTmp2), " ");
            }
            
            
add(szTmp2charsmax(szTmp2), szTmp);
            
        }
        else
        {
            
            
add(szTmp2charsmax(szTmp2), szLevel);
            
            if(
get_user_flags(id) & ADMIN_LEVEL_H){
                
add(szTmp2charsmax(szTmp2), " ");
                
add(szTmp2charsmax(szTmp2), g_Prefix);
            }
            
            
add(szTmp2charsmax(szTmp2), "^x03 %s1^x01 :  %s2");
            
        }
        
        
set_msg_arg_string(2szTmp2);
    
    return 
PLUGIN_CONTINUE;
    




All times are GMT -4. The time now is 11:35.

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