AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [CS] Block FreeLook, ChaseCam and etc. center-printed msg after death (https://forums.alliedmods.net/showthread.php?t=206491)

alonelive 01-23-2013 04:49

[CS] Block FreeLook, ChaseCam and etc. center-printed msg after death
 
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? :)

FromTheFuture 01-23-2013 05:50

Re: [CS] Block FreeLook, ChaseCam and etc. center-printed msg after death
 
get_msg_arg_string
get the second argument (iMsgDest) to szMessage

alonelive 01-23-2013 06:05

Re: [CS] Block FreeLook, ChaseCam and etc. center-printed msg after death
 
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.


All times are GMT -4. The time now is 20:39.

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