Raised This Month: $12 Target: $400
 3% 

[Solved] How to Add Level tag in Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
real sap
Member
Join Date: Aug 2015
Location: India
Old 04-16-2016 , 00:31   [Solved] How to Add Level tag in Chat
Reply With Quote #1

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

Last edited by real sap; 04-27-2016 at 01:36.
real sap is offline
Send a message via Skype™ to real sap
real sap
Member
Join Date: Aug 2015
Location: India
Old 04-18-2016 , 10:50   Re: How to Add Level tag in Chat
Reply With Quote #2

Bump !!!!!! I dont think is this as Impossible or Tuff
real sap is offline
Send a message via Skype™ to real sap
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-18-2016 , 19:52   Re: How to Add Level tag in Chat
Reply With Quote #3

FYI, see this (the third bullet point in particular).
__________________
fysiks is offline
real sap
Member
Join Date: Aug 2015
Location: India
Old 04-19-2016 , 06:08   Re: How to Add Level tag in Chat
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
FYI, see this (the third bullet point in particular).
ok sorry for that... can you help me in this ?
real sap is offline
Send a message via Skype™ to real sap
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 04-21-2016 , 07:37   Re: How to Add Level tag in Chat
Reply With Quote #5

This isnt hlds related issue. Please post in suggestions / request .
tousif is offline
real sap
Member
Join Date: Aug 2015
Location: India
Old 04-21-2016 , 12:42   Re: How to Add Level tag in Chat
Reply With Quote #6

Quote:
Originally Posted by tousif View Post
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
real sap is offline
Send a message via Skype™ to real sap
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-21-2016 , 14:14   Re: How to Add Level tag in Chat
Reply With Quote #7

lol
__________________
gabuch2 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-22-2016 , 14:01   Re: How to Add Level tag in Chat
Reply With Quote #8

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.
siriusmd99 is offline
real sap
Member
Join Date: Aug 2015
Location: India
Old 04-22-2016 , 23:46   Re: How to Add Level tag in Chat
Reply With Quote #9

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 .

Last edited by real sap; 04-23-2016 at 00:00.
real sap is offline
Send a message via Skype™ to real sap
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-24-2016 , 13:52   Re: How to Add Level tag in Chat
Reply With Quote #10

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;
    


Last edited by siriusmd99; 04-24-2016 at 13:53.
siriusmd99 is offline
Reply


Thread Tools
Display Modes

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 09:23.


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