Raised This Month: $51 Target: $400
 12% 

hooking game start or messages


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
killerZM
Senior Member
Join Date: Sep 2016
Old 08-23-2017 , 15:27   hooking game start or messages
Reply With Quote #1

hi all
i am trying to hook round start
is this a right way ?

i made a forward and execute it here but when i try to send a text in(pawn code)
it give me arror
PHP Code:
void MessageBeginPost(int msg_destint type, const float *orgedict_t *ed)
{
    if (
type == AVPMessages.deathmsg && gpGlobals -> time 6)
    {
        
AVPMessages.message DeathMsg;
        
AVPMessages.byte 0;
    }
    else if (
type == AVPMessages.hltv && gpGlobals->time 6)
    {
        
AVPMessages.message HLTV;
        
AVPMessages.byte 0;
    }
    else if (
type == AVPMessages.bartime && gpGlobals->time 6)
    {
        
AVPMessages.message BarTime;
        
AVPMessages.byte 0;
    }
    else if (
type == AVPMessages.damage && gpGlobals->time 6)
    {
        
AVPMessages.message Damage;
        
AVPMessages.byte 0;
    }
    
RETURN_META(MRES_IGNORED);
}

void MessageEndPost(void)
{
    if (
AVPMessages.message)
        
AVPMessages.message 0;
    
RETURN_META(MRES_IGNORED);
}

void WriteByte_Post(int Byte)
{
    if (
AVPMessages.message)
        switch (
AVPMessages.message)
        {
        case 
HLTV:
        {
            
            
MF_Log("Errror");
            switch (++
AVPMessages.byte)
            {
            case 
1:
            {
                
AVPMessages.status Byte;
                break;
            }
            case 
2:
            {
                
//MF_ExecuteForward(AVPForwards.roundstart);
                
if (!AVPMessages.status && !Byte) {
                    
MF_Log("RoundSTart");
                    
SERVER_PRINT("Aliredators");
                    
MF_PrintSrvConsole("KILLED");
                }
                break;
            }
            }
            break;
        }
        case 
DeathMsg:
        {
            if (++
AVPMessages.byte == )
            {
                
                
MF_ExecuteForward(AVPForwards.death static_cast<cell>(Byte));
                
MF_PrintSrvConsole("KILLED");
                break;
            }
            break;
        }
        }
}

int RegUserMsgPost(const char pNameint)
{
    if (!
strcmp(pName"DeathMsg"))
        
AVPMessages.deathmsg META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"HLTV"))
        
AVPMessages.hltv META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"ScoreAttrib"))
        
AVPMessages.scoreattrib META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"ScoreInfo"))
        
AVPMessages.scoreinfo META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"TeamInfo"))
        
AVPMessages.teaminfo META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"SayText"))
        
AVPMessages.saytext META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"ScreenFade"))
        
AVPMessages.screenfade META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"ScreenShake"))
        
AVPMessages.screenshake META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"Crosshair"))
        
AVPMessages.crosshair META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"HideWeapon"))
        
AVPMessages.hideweapon META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"Damage"))
        
AVPMessages.damage META_RESULT_ORIG_RET(int);

    else if (!
strcmp(pName"BarTime"))
        
AVPMessages.bartime META_RESULT_ORIG_RET(int);

    
RETURN_META_VALUE(MRES_IGNORED0);

killerZM 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 13:32.


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