Raised This Month: $ Target: $400
 0% 

Disable HUD at ban


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
krysteksulek
Member
Join Date: Aug 2013
Location: Poland
Old 07-15-2014 , 06:02   Re: Disable HUD at ban
Reply With Quote #3

Ok. So i have that code in AmxBans:

Code:
case 1:
        {
            new playerCount, idx, players[32]
            get_players(players, playerCount)
            for (idx=0; idx<playerCount; idx++) {
                if (is_user_hltv(players[idx]) || is_user_bot(players[idx])) continue // Dont count HLTV or bots as players
                
                get_time_length(players[idx], iBanLength, timeunit_minutes, cTimeLengthPlayer, 127)
                
                if (g_choiceTime[id] > 0)
                    format(message,190,"%L", players[idx],"PUBLIC_BAN_ANNOUNCE", pl_nick, cTimeLengthPlayer, ban_reason)
                else
                    format(message,190,"%L", players[idx],"PUBLIC_BAN_ANNOUNCE_PERM", pl_nick, ban_reason)
                
                if ( get_pcvar_num(pcvar_show_hud_messages) == 1 ) 
                {
                    set_hudmessage(0, 255, 0, 0.05, 0.30, 0, 6.0, 10.0 , 0.5, 0.15, -1)
                    ShowSyncHudMsg(players[idx], g_MyMsgSync, "%s", message)
                }
                //client_print(players[idx],print_chat, "%s", message)
                ColorChat(players[idx], RED, "[AMXBans]^x01 %s", message)
                client_print(players[idx],print_console, "%s", message)
            }
        }
How to catch ban reason? I tried something like this, but it's not correct:

Code:
if ( get_pcvar_num(pcvar_show_hud_messages) == 1 && ban_reason != "Ping") 
                {
                    set_hudmessage(0, 255, 0, 0.05, 0.30, 0, 6.0, 10.0 , 0.5, 0.15, -1)
                    ShowSyncHudMsg(players[idx], g_MyMsgSync, "%s", message)
                }
krysteksulek is offline
 



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 21:16.


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