Raised This Month: $ Target: $400
 0% 

how to check whether there is a local message, if not do another poss


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
login_xcvop
Member
Join Date: Nov 2013
Old 01-26-2014 , 07:05   how to check whether there is a local message, if not do another poss
Reply With Quote #1

how to check whether there is a space hudmsg, if not space do another poss ?
login_xcvop is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-26-2014 , 07:39   Re: how to check whether there is a local message, if not do another poss
Reply With Quote #2

What??
__________________
fysiks is offline
login_xcvop
Member
Join Date: Nov 2013
Old 01-26-2014 , 08:28   Re: how to check whether there is a local message, if not do another poss
Reply With Quote #3

if show_hudmessage in display really exist

how to check whether there is a space write
show_hudmessage, if not space do another poss ?
Quote:
set_hudmessage(0, 0, 255, poss, poss, 0, 6.0, 6.0, 0.5, 0.15, -1)

Last edited by login_xcvop; 01-26-2014 at 08:31.
login_xcvop is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-26-2014 , 17:11   Re: how to check whether there is a local message, if not do another poss
Reply With Quote #4

Please speak in english: position

Afaik, it is not possible to know via a plugin if different HUD messages are going to overlap.
__________________

Last edited by fysiks; 01-26-2014 at 17:12.
fysiks is offline
login_xcvop
Member
Join Date: Nov 2013
Old 01-26-2014 , 23:57   Re: how to check whether there is a local message, if not do another poss
Reply With Quote #5

PHP Code:
new Float:POS 0.55

POS 
+= 0.03

if(POS >= 0.67)
{
       
POS 0.55

admin chat poss
PHP Code:
#include <amxmodx>
#include <amxmisc>

new g_msgChannel

#define MAX_CLR 10

new g_Colors[MAX_CLR][] = {"COL_WHITE""COL_RED""COL_GREEN""COL_BLUE""COL_YELLOW""COL_MAGENTA""COL_CYAN""COL_ORANGE""COL_OCEAN""COL_MAROON"}
new 
g_Values[MAX_CLR][] = {{255255255}, {25500}, {02550}, {00255}, {2552550}, {2550255}, {0255255}, {227968}, {4589116}, {1034438}}
new 
Float:g_Pos[4][] = {{0.00.0}, {0.050.55}, {-1.00.2}, {-1.00.7}}

new 
amx_show_activity;
new 
g_AdminChatFlag ADMIN_CHAT;

public 
plugin_init()
{
    new 
admin_chat_id

    register_plugin
("Admin Chat"AMXX_VERSION_STR"AMXX Dev Team")
    
register_dictionary("adminchat.txt")
    
register_dictionary("common.txt")
    
register_clcmd("say""cmdSayChat"ADMIN_CHAT"@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
    
register_clcmd("say_team""cmdSayAdmin"0"@<text> - displays message to admins")
    
register_concmd("amx_say""cmdSay"ADMIN_CHAT"<message> - sends message to all players")
    
admin_chat_id register_concmd("amx_chat""cmdChat"ADMIN_CHAT"<message> - sends message to admins")
    
register_concmd("amx_psay""cmdPsay"ADMIN_CHAT"<name or #userid> <message> - sends private message")
    
register_concmd("amx_tsay""cmdTsay"ADMIN_CHAT"<color> <message> - sends left side hud message to all players")
    
register_concmd("amx_csay""cmdTsay"ADMIN_CHAT"<color> <message> - sends center hud message to all players")
    
    
amx_show_activity get_cvar_pointer("amx_show_activity");
    
    if (
amx_show_activity == 0)
    {
        
amx_show_activity register_cvar("amx_show_activity""2");
    }

    new 
str[1]
    
get_concmd(admin_chat_idstr0g_AdminChatFlagstr0, -1)
}

public 
cmdSayChat(id)
{
    if (!
access(idg_AdminChatFlag))
    {
        return 
PLUGIN_CONTINUE
    
}
    
    new 
said[6], 0
    read_argv
(1said5)
    
    while (
said[i] == '@')
    {
        
i++
    }
    
    if (!
|| 3)
    {
        return 
PLUGIN_CONTINUE
    
}
    
    new 
message[192], 0
    read_args
(message191)
    
remove_quotes(message)
    
    switch (
said[i])
    {
        case 
'r'1
        
case 'g'2
        
case 'b'3
        
case 'y'4
        
case 'm'5
        
case 'c'6
        
case 'o'7
    
}
    
    new 
ni
    
if (a)
    {
        
n++
        
s++
    }
    while (
said[s] && isspace(said[s]))
    {
        
n++
        
s++
    }
    

    new 
name[32], authid[32], userid
    
    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^""nameuseridauthidmessage[n])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")"nameuseridauthidmessage[n], "en"g_Colors[a])
    
    if (++
g_msgChannel || g_msgChannel 3)
    {
        
g_msgChannel 3
    
}
    
    new 
Float:verpos g_Pos[i][1] + float(g_msgChannel) / 35.0
    
    set_hudmessage
(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos06.06.00.50.15, -1)

    switch ( 
get_pcvar_num(amx_show_activity) )
    {
        case 
34:
        {
            new 
maxpl get_maxplayers();
            for (new 
pl 1pl <= maxplpl++)
            {
                if (
is_user_connected(pl) && !is_user_bot(pl))
                {
                    if (
is_user_admin(pl))
                    {
                        
show_hudmessage(pl"%s :   %s"namemessage[n])
                        
client_print(plprint_notify"%s :   %s"namemessage[n])
                    }
                    else
                    {
                        
show_hudmessage(pl"%s"message[n])
                        
client_print(plprint_notify"%s"message[n])
                    }
                }
            }
        }
        case 
2:
        {
            
show_hudmessage(0"%s :   %s"namemessage[n])
            
client_print(0print_notify"%s :   %s"namemessage[n])
        }
        default:
        {
            
show_hudmessage(0"%s"message[n])
            
client_print(0print_notify"%s"message[n])
        }
    }

    return 
PLUGIN_HANDLED


Last edited by login_xcvop; 01-26-2014 at 23:59.
login_xcvop 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 10:12.


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