Raised This Month: $ Target: $400
 0% 

2 Ham Sandwich Questions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 08-08-2010 , 03:24   2 Ham Sandwich Questions
Reply With Quote #1

PHP Code:
public eDeathiVictimiAttacker )
{
    if( 
iVictim == iAttacker )
    {
        if( 
cs_get_user_team(iVictim) == CS_TEAM_T )
        {
            
client_print_color0Red"^4[Jailbreak]^3 %s ^1committed suicide^4!" )
        }
        
        if( 
cs_get_user_team(iVictim) == CS_TEAM_CT )
        {
            if( 
gLastRequest == true )
            {
                
client_print_color0Blue"^4[Jailbreak] ^1Lol^4,^1 an officer got scared^4." )
                
client_print_color0Blue"^4[Jailbreak] ^1You lost^4 5 VCP^1 for commiting suicide^4." )
                
PlayerXP[iVictim] -= 5;
                
                return 
PLUGIN_HANDLED;
            }
            
            
client_print_color0Blue"^4[Jailbreak]^3 %s ^1committed suicide^4!" )
        }
        
        return 
PLUGIN_HANDLED;
    }
    
    if( 
gInLR[iVictim] == true )
    {
        if( 
cs_get_user_team(iAttacker) == CS_TEAM_T )
        {
            new 
szName[32];
            
get_user_nameiAttackerszName32 )
            
client_print_color0Red"^4[Prisoner]^3 %s ^1won the Last Request^4!"szName )
            
            
PlayerXP[iAttacker] += 10
            client_print_color
iAttackerBlue"^1You gained^4 10 VCP^1 for winning^4!" )
            
            
gInLR[iVictim] = false;
            
gInLR[iAttacker] = false;
            
gLastRequest false;
            
gShot4Shot false;
            
gShotDeagle[iAttacker] = false;
            
gShotDeagle[iVictim] = false;
            
gToss false;
            
            return 
PLUGIN_HANDLED;
        }
        
        if( 
cs_get_user_team(iAttacker) == CS_TEAM_CT )
        {
            new 
szName[32];
            
get_user_nameiAttackerszName32 )
            
client_print_color0Blue"^4[Guard]^3 %s ^1won the Last Request^4!"szName )
            
            
PlayerXP[iAttacker] += 10
            client_print_color
iAttackerBlue"^1You gained^4 10 VCP^1 for winning^4!" )
            
            
gShotDeagle[iAttacker] = false;
            
gInLR[iAttacker] = false;
            
gInLR[iVictim] = false;
            
gShotDeagle[iVictim] = false;
            
gIsRebel[iVictim] = false;
            
gLastRequest false;
            
gShot4Shot false;
            
gToss false;
            
            return 
PLUGIN_HANDLED;
        }
        
        return 
PLUGIN_HANDLED;
    }
    
    if( 
cs_get_user_team(iVictim) == CS_TEAM_CT )
    {
        if( 
cs_get_user_team(iAttacker) == CS_TEAM_T )
        {
            
PlayerXP[iAttacker] += 5
            client_print_color
iAttackerBlue"^1You gained^4 5 VCP^1!" )
            
            return 
PLUGIN_HANDLED;
        }
        
        return 
PLUGIN_HANDLED;
    }
    
    if( 
cs_get_user_team(iVictim) == CS_TEAM_T )
    {
        
gIsRebel[iVictim] = false;
        
        if( 
cs_get_user_team(iAttacker) == CS_TEAM_CT )
        {
            
PlayerXP[iAttacker] += 5;
            
client_print_coloriAttackerBlue"^1You gained^4 5 VCP^1!" )
            
            return 
PLUGIN_HANDLED;
        }
        
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;

#1: Is it a bad habit to be using PLUGIN_HANDLED inside of Ham_Killed functions?
#2: Is it possible that using PLUGIN_HANDLED; inside of Ham_Killed functions can block death messages that appear top right?

Also, if using PLUGIN_HANDLED is a bad habit, should I use HAM_HANDLED instead? Or HAM_IGNORED;
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX 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 00:15.


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