Raised This Month: $ Target: $400
 0% 

[CS] Block FreeLook, ChaseCam and etc. center-printed msg after death


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 01-23-2013 , 04:49   [CS] Block FreeLook, ChaseCam and etc. center-printed msg after death
Reply With Quote #1

Hello!
PHP Code:
register_message(get_user_msgid("TextMsg"), "Message_TextMsg")

public 
Message_TextMsg(iMsgIdiMsgDestid)
{
        if( 
equal(szMessage"#OBS_CHASE_LOCKED || #OBS_CHASE_FREE || #OBS_IN_EYE || #OBS_MAP_CHASE || #OBS_MAP_FREE || #OBS_ROAMING") )
        {
            return 
PLUGIN_HANDLED
        
}
    return 
PLUGIN_CONTINUE

PHP Code:
"Cstrike_TitlesTXT_OBS_CHASE_FREE"            "Free Chase Cam"
"Cstrike_TitlesTXT_OBS_CHASE_LOCKED"            "Locked Chase Cam"
"Cstrike_TitlesTXT_OBS_IN_EYE"            "First Person"
"Cstrike_TitlesTXT_OBS_MAP_CHASE"            "Chase Overview"
"Cstrike_TitlesTXT_OBS_MAP_FREE"            "Free Overview"
"Cstrike_TitlesTXT_OBS_NONE"            "Camera Options"
"Cstrike_TitlesTXT_OBS_ROAMING"            "Free Look" 
This construction not works. Any ideas please?
__________________
sorry my bad english...

Last edited by alonelive; 01-23-2013 at 04:51.
alonelive is offline
FromTheFuture
Senior Member
Join Date: Jan 2013
Old 01-23-2013 , 05:50   Re: [CS] Block FreeLook, ChaseCam and etc. center-printed msg after death
Reply With Quote #2

get_msg_arg_string
get the second argument (iMsgDest) to szMessage

Last edited by FromTheFuture; 01-23-2013 at 05:52.
FromTheFuture is offline
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 01-23-2013 , 06:05   Re: [CS] Block FreeLook, ChaseCam and etc. center-printed msg after death
Reply With Quote #3

PHP Code:
#include <amxmodx> 

#define PLUGIN "Romanian Spec Messages" 
#define VERSION "0.0.1" 
#define AUTHOR "ConnorMcLeod" 

#define PRINT_CENTER    4 

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_messageget_user_msgid("TextMsg"), "Message_TextMsg" 


public 
Message_TextMsg(msgidMSG_DESTid

    if( 
MSG_DEST == MSG_ONE ) {
        if( !
is_user_alive(id) ) {
            if( 
get_msg_arg_int(1) == PRINT_CENTER ) {

                static 
szMessage[35
                
get_msg_arg_string(2szMessage34

                if( 
szMessage[1] == 'S' || szMessage[6] == 'M' ) {
                    return 
PLUGIN_HANDLED
                
}
            }
        }
    }
    return 
PLUGIN_CONTINUE

I think, question is solved.
__________________
sorry my bad english...

Last edited by alonelive; 01-23-2013 at 06:47.
alonelive 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 20:39.


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