Raised This Month: $ Target: $400
 0% 

[HELP] Permanent chat message (on some possition)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-22-2014 , 19:11   [HELP] Permanent chat message (on some possition)
Reply With Quote #1

Hey, guys! I want to ask you what are the parameters of message_begin, write_any, etc, to create a permanent chat message, mostly under chat. I would also ask you for some information about each part of the code, to know what I'm exactly doing. Where are the possition, the text, the type of message, the index, defined and what does every line mean. Thanks alot, cuz I know someone will help with that easy one! Example picture attached.
Attached Images
File Type: jpg ChatMsg.jpg (40.4 KB, 163 views)
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
wickedd
Veteran Member
Join Date: Nov 2009
Old 06-22-2014 , 19:18   Re: [HELP] Permanent chat message (on some possition)
Reply With Quote #2

Search "Statustext".
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-22-2014 , 19:25   Re: [HELP] Permanent chat message (on some possition)
Reply With Quote #3

Found some info! Okay, now the other question - how to use it? I mean, probably I have to register_message("some_message", "its_function")
but how can I hook it only for alive, only for dead, and when it's called? Something I can't find...
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
wickedd
Veteran Member
Join Date: Nov 2009
Old 06-22-2014 , 19:56   Re: [HELP] Permanent chat message (on some possition)
Reply With Quote #4

You would show like you would any other message.
Try the code below, you will need the colorstatus.inc from this thread. It should give an idea of how to use it.

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <colorstatus.inc>

new g_iMax;

public 
plugin_init() {
    
    
set_task(1.0"Teams"0""0"b")
    
    
g_iMax get_maxplayers();
    
initColorStatus();
}

public 
TeamsiPlayer )
{

    for(new 
iPlayer 1iPlayer <= g_iMaxiPlayer++ ) 
{
    if ( !
is_user_aliveiPlayer ) || is_user_botiPlayer ) )
        continue;
    
    switch ( 
get_user_teamiPlayer ) )
    {
        case 
CS_TEAM_T:
        {
            
makeStatusText(iPlayer,RED_STATUS,0.0," : [Terrorist]" );
        }
        case 
CS_TEAM_CT:
        {
            
makeStatusText(iPlayer,BLUE_STATUS,0.0," : [Counter Terrorist]" );
        }
    }
}  


__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 06-22-2014 at 20:00.
wickedd is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-22-2014 , 20:01   Re: [HELP] Permanent chat message (on some possition)
Reply With Quote #5

Wow, that's some other way. Thanks for that method! But I'm still interested of the method with message_begin and the most detailed way.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 06-23-2014 , 05:00   Re: [HELP] Permanent chat message (on some possition)
Reply With Quote #6

The annoying part about this is that if the client has "hud_centerid 1" it will appear in the middle.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
GinNNy
Senior Member
Join Date: Mar 2014
Old 06-23-2014 , 05:59   Re: [HELP] Permanent chat message (on some possition)
Reply With Quote #7

Why is it #include <colorstatus.inc>
why not just #include <colorstatus>
GinNNy is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 06-23-2014 , 06:20   Re: [HELP] Permanent chat message (on some possition)
Reply With Quote #8

Quote:
Originally Posted by GinNNy View Post
Why is it #include <colorstatus.inc>
why not just #include <colorstatus>
Both are the same thing.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
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 21:15.


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