Raised This Month: $ Target: $400
 0% 

Function Repeated


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-05-2010 , 05:11   Function Repeated
Reply With Quote #1

When g_bRebel is true that means they are rebel. but for some reason even when its true and player has been killed its suppose to show
client_printc(0, "%s !tGuard %s Killed Prisoner !t%s !g( Rebel )", PREFIX, szKName, szVName);

but for some reason it just goes to the unarmed one when they are a rebel. I just seems to skip if(g_bRebel[iVictim])
{

and go to !IsArmed. even when i put !IsArmed && !g_bRebel[iVictim]

wats the problem can someone help

PHP Code:
// Death Message
public Event_DeathMsg()
{
    new 
iVictim read_data(2);
    new 
iKiller read_data(1);
    
    if(
IsPlayer(iKiller) && cs_get_user_team(iVictim) == CS_TEAM_T && Game != LR_NADE && cs_get_user_team(iKiller) == CS_TEAM_CT && !g_bLROneProgress && !g_bLRInProgress[iKiller])
    {
        if(
g_bRebel[iVictim])
        {
            new 
szVName[32];
            new 
szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Rebel )"PREFIXszKNameszVName);
            
            
Shop_XP[iKiller] += get_pcvar_num(p_KillRebelXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Rebel"PREFIXget_pcvar_num(p_KillRebelXP));
        }
        
        else if(
IsArmed(iVictim))
        {
            new 
szVName[32], szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Armed Prisoner )"PREFIXszKNameszVName);
            
            
Shop_XP[iKiller] += get_pcvar_num(p_KillArmedPXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Armed Prisoner"PREFIXget_pcvar_num(p_KillArmedPXP));
        }
        
        else if(!
IsArmed(iVictim))
        {
            new 
szVName[32], szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Unarmed Prisoner )"PREFIXszKNameszVName);
        }
    }
    
    else if(
g_bLRInProgress[iVictim] && iKiller != iVictim)
    {
        switch(
Game)
        {
            case 
LR_KNIFE:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tKnife Fight!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SHOT:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShot 4 Shot!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_NADE:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tGrenade Battle!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_FRENZY:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShooting Frenzy!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SHOTTY:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShotty Madness!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SCOUT:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tScoutz Supprise!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
        }
    }
    
    if(
cs_get_user_team(iVictim) == CS_TEAM_CT)
    {    
        if(
IsPlayer(iKiller) && cs_get_user_team(iKiller) == CS_TEAM_T && !g_bLRInProgress[iVictim] && !g_bLRInProgress[iKiller])
        {
            
Shop_XP[iKiller] += get_pcvar_num(p_KillGuardXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Guard"PREFIXget_pcvar_num(p_KillGuardXP));
        }
    }
    
    return 
PLUGIN_HANDLED;
}

// Damage
public fwdHamTakeDamage(iVictimiAttackerFloat:iDmg)
{
    if(!(
<= iAttacker <= g_iMaxPlayers))
        return 
HAM_IGNORED;
    
    if( ( 
g_bLRInProgress[iVictim] && g_bLRInProgress[iAttacker] ) || ( iAttacker == iVictim ) )
        return 
HAM_IGNORED;
    
    else if(
g_bLRInProgress[iVictim] && !g_bLRInProgress[iAttacker])
    {
        new 
AttHealth get_user_health(iAttacker);
        
        if( (
AttHealth iDmg) <= 0)
        {
            
user_kill(iAttacker);
            
            
// Say why he was killed
            
client_printc(iVictim"%s You were killed for attacking a player in !gLast Request!n"PREFIX);
        }

        else
        {
            
set_user_health(iAttackerfloatround(AttHealth iDmg));
        }
        
        return 
HAM_SUPERCEDE;
    }

    else if(
g_bLRInProgress[iAttacker] && !g_bLRInProgress[iVictim])
    {
        if( 
Game == LR_FRENZY || Game == LR_NADE || Game == LR_SHOTTY )
            return 
HAM_SUPERCEDE;
        
        
// Get attacker's health
        
new AttHealth get_user_health(iAttacker);
        
        if( (
AttHealth iDmg) <= )
        {
            
user_kill(iAttacker);
            
            
client_printc(iVictim"%s You were killed for attacking a player not in !gLast Request!n"PREFIX);
        }
        
        else
        {
            
set_user_health(iAttackerfloatround(AttHealth iDmg));
        }
        
        return 
HAM_SUPERCEDE;
    }
    
    if(
cs_get_user_team(iVictim) == CS_TEAM_CT && cs_get_user_team(iAttacker) == CS_TEAM_T && !g_bLROneProgress)
    {
        if(
get_pcvar_num(p_Rebel))
        {
            if(!
g_bRebel[iAttacker])
            {
                
// Make him a rebel
                
Set_Player_Rebel(iAttacker);
            }
        }
    }
    
    return 
HAM_IGNORED;
}

public 
damage_event(iVictim)
{
    new 
iAttacker get_user_attacker(iVictim);
    
    if(
get_pcvar_num(p_FreeKillDetection))
    {    
        if(
IsPlayer(iAttacker) && !g_bLROneProgress && g_bRebel[iVictim] && cs_get_user_team(iVictim) == CS_TEAM_T && !g_bLRInProgress[iVictim] && g_bAlive[iVictim] && cs_get_user_team(iAttacker) == CS_TEAM_CT)
        {
            if( 
read_data(4) || read_data(5) || read_data(6)  && g_bAlive[iVictim] && g_bAlive[iAttacker]) 
            {         
                new 
szAName[32];
                new 
szVName[32];
                
                
get_user_name(iAttackerszAName31);
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n Has Attacked !g%s!n !t( Rebel )!n"PREFIXszANameszVName);
            }
        }
        
        else if(
IsPlayer(iAttacker) && !g_bRebel[iVictim] && !g_bLROneProgress && cs_get_user_team(iVictim) == CS_TEAM_T && !g_bLRInProgress[iVictim] && g_bAlive[iVictim] && cs_get_user_team(iAttacker) == CS_TEAM_CT && !IsArmed(iVictim))
        {
            if( 
read_data(4) || read_data(5) || read_data(6)  && g_bAlive[iVictim] && g_bAlive[iAttacker]) 
            {     
                new 
szAName[32];
                new 
szVName[32];
                
                
get_user_name(iAttackerszAName31);
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n Has Attacked !g%s!n !t( Unarmed Prisoner )!n"PREFIXszANameszVName);
            }
        }
        
        else if(
IsPlayer(iAttacker) && !g_bLROneProgress && !g_bRebel[iVictim] && cs_get_user_team(iVictim) == CS_TEAM_T && !g_bLRInProgress[iVictim] && g_bAlive[iVictim] && cs_get_user_team(iAttacker) == CS_TEAM_CT && IsArmed(iVictim))
        {
            if( 
read_data(4) || read_data(5) || read_data(6)  && g_bAlive[iVictim] && g_bAlive[iAttacker]) 
            {         
                new 
szAName[32];
                new 
szVName[32];
                
                
get_user_name(iAttackerszAName31);
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n Has Attacked !g%s!n !t( Armed Prisoner )!n"PREFIXszANameszVName);
            }
        }
    }
    
    
    
    return 
PLUGIN_HANDLED;

__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-05-2010 , 05:15   Re: Function Repeated
Reply With Quote #2

opps sorry rong title.
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-05-2010 , 05:23   Re: Function Repeated
Reply With Quote #3

sorry for rong title. i was gonna post about repeating function but i fixed that problem. so its just this problem atm.
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
NzGamers
Member
Join Date: Jul 2009
Old 07-06-2010 , 17:30   Re: Function Repeated
Reply With Quote #4

Quote:
Originally Posted by shuttle_wave View Post
sorry for rong title. i was gonna post about repeating function but i fixed that problem. so its just this problem atm.
PHP Code:
// Death Message
public Event_DeathMsg()
{
    new 
iVictim read_data(2);
    new 
iKiller read_data(1);
    
    if(!
IsPlayer(iKiller))
    {
        return 
PLUGIN_HANDLED;
    }
    
    else if(
cs_get_user_team(iVictim) == CS_TEAM_T && Game != LR_NADE && cs_get_user_team(iKiller) == CS_TEAM_CT && !g_bLROneProgress && !g_bLRInProgress[iKiller])
    {
        if(
read_data(4) || read_data(5) || read_data(6) && g_bRebel[iVictim])
        {
            new 
szVName[32];
            new 
szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Rebel )"PREFIXszKNameszVName);
            
            
Shop_XP[iKiller] += get_pcvar_num(p_KillRebelXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Rebel"PREFIXget_pcvar_num(p_KillRebelXP));
        }
        
        else if(
IsArmed(iVictim))
        {
            new 
szVName[32], szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Armed Prisoner )"PREFIXszKNameszVName);
            
            
Shop_XP[iKiller] += get_pcvar_num(p_KillArmedPXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Armed Prisoner"PREFIXget_pcvar_num(p_KillArmedPXP));
        }
        
        else if(!
IsArmed(iVictim))
        {
            new 
szVName[32], szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Unarmed Prisoner )"PREFIXszKNameszVName);
        }
    }
    
    else if(
g_bLRInProgress[iVictim] && iKiller != iVictim)
    {
        switch(
Game)
        {
            case 
LR_KNIFE:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tKnife Fight!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SHOT:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShot 4 Shot!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_NADE:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tGrenade Battle!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_FRENZY:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShooting Frenzy!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SHOTTY:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShotty Madness!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SCOUT:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tScoutz Supprise!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
        }
    }
    
    if(
cs_get_user_team(iVictim) == CS_TEAM_CT)
    {    
        if(
IsPlayer(iKiller) && cs_get_user_team(iKiller) == CS_TEAM_T && !g_bLRInProgress[iVictim] && !g_bLRInProgress[iKiller])
        {
            
Shop_XP[iKiller] += get_pcvar_num(p_KillGuardXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Guard"PREFIXget_pcvar_num(p_KillGuardXP));
        }
    }
    
    return 
PLUGIN_HANDLED;

NzGamers is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-07-2010 , 09:26   Re: Function Repeated
Reply With Quote #5

Quote:
Originally Posted by NzGamers View Post
PHP Code:
// Death Message
public Event_DeathMsg()
{
    new 
iVictim read_data(2);
    new 
iKiller read_data(1);
    
    if(!
IsPlayer(iKiller))
    {
        return 
PLUGIN_HANDLED;
    }
    
    else if(
cs_get_user_team(iVictim) == CS_TEAM_T && Game != LR_NADE && cs_get_user_team(iKiller) == CS_TEAM_CT && !g_bLROneProgress && !g_bLRInProgress[iKiller])
    {
        if(
read_data(4) || read_data(5) || read_data(6) && g_bRebel[iVictim])
        {
            new 
szVName[32];
            new 
szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Rebel )"PREFIXszKNameszVName);
            
            
Shop_XP[iKiller] += get_pcvar_num(p_KillRebelXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Rebel"PREFIXget_pcvar_num(p_KillRebelXP));
        }
        
        else if(
IsArmed(iVictim))
        {
            new 
szVName[32], szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Armed Prisoner )"PREFIXszKNameszVName);
            
            
Shop_XP[iKiller] += get_pcvar_num(p_KillArmedPXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Armed Prisoner"PREFIXget_pcvar_num(p_KillArmedPXP));
        }
        
        else if(!
IsArmed(iVictim))
        {
            new 
szVName[32], szKName[32];
            
            
get_user_name(iVictimszVNamecharsmax(szVName));
            
get_user_name(iKillerszKNamecharsmax(szKName));
            
            
client_printc(0"%s !tGuard %s Killed Prisoner !t%s !g( Unarmed Prisoner )"PREFIXszKNameszVName);
        }
    }
    
    else if(
g_bLRInProgress[iVictim] && iKiller != iVictim)
    {
        switch(
Game)
        {
            case 
LR_KNIFE:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tKnife Fight!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SHOT:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShot 4 Shot!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_NADE:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tGrenade Battle!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_FRENZY:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShooting Frenzy!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SHOTTY:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tShotty Madness!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
            
            case 
LR_SCOUT:
            {
                new 
szKName[32];
                
get_user_name(iKillerszKName31);
                
                new 
szVName[32];
                
get_user_name(iVictimszVName31);
                
                
client_printc(0"%s !g%s!n has won !tScoutz Supprise!n against !g%s!n"PREFIXszKNameszVName);
                
                
g_bLRInProgress[iVictim] = false;
                
g_bLRInProgress[iKiller] = false;
                
                
g_bBeacon[iVictim] = false;
                
g_bBeacon[iKiller] = false;
                
g_bLRCountDownProgress false;
                
                
remove_task(TASK_COUNTDOWN);
                
remove_task(TASK_BOMB);
                
remove_task(TASK_HIDDEN);
                
remove_task(TASK_CRAZY);
                
                
strip_user_weapons(iKiller);
                
give_item(iKiller"weapon_knife");
                
set_user_health(iKiller100);
            }
        }
    }
    
    if(
cs_get_user_team(iVictim) == CS_TEAM_CT)
    {    
        if(
IsPlayer(iKiller) && cs_get_user_team(iKiller) == CS_TEAM_T && !g_bLRInProgress[iVictim] && !g_bLRInProgress[iKiller])
        {
            
Shop_XP[iKiller] += get_pcvar_num(p_KillGuardXP);
            
client_printc(iKiller"%s You have recieved !g%iXP!n for killing a Guard"PREFIXget_pcvar_num(p_KillGuardXP));
        }
    }
    
    return 
PLUGIN_HANDLED;

wtf man. it hardly makes any differnts. seem thing . it just skips the rebel bit
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-10-2010 , 11:34   Re: Function Repeated
Reply With Quote #6

Add some debug messages in... you're obviously assigning g_bRebel[] incorrectly. Plugins don't just skip conditionals randomly.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-10-2010 , 11:41   Re: Function Repeated
Reply With Quote #7

Quote:
Originally Posted by wrecked_ View Post
Add some debug messages in... you're obviously assigning g_bRebel[] incorrectly. Plugins don't just skip conditionals randomly.
um. i have attack msg too and it shows that they are rebel but on the death it doesnt. to me on steam ill send u my whole jb code and u check.
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-10-2010 , 11:43   Re: Function Repeated
Reply With Quote #8

Quote:
Originally Posted by shuttle_wave View Post
um. i have attack msg too and it shows that they are rebel but on the death it doesnt. to me on steam ill send u my whole jb code and u check.
I'm not here to hold your hand through the debugging process. Look yourself. The code obviously isn't assigning the boolean to the player correctly before the DeathMsg, since that's what you're having issues with.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-10-2010 , 11:50   Re: Function Repeated
Reply With Quote #9

Quote:
Originally Posted by wrecked_ View Post
I'm not here to hold your hand through the debugging process. Look yourself. The code obviously isn't assigning the boolean to the player correctly before the DeathMsg, since that's what you're having issues with.
ok. ill add some in and so some testing
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-10-2010 , 11:55   Re: Function Repeated
Reply With Quote #10

Quote:
Originally Posted by wrecked_ View Post
I'm not here to hold your hand through the debugging process. Look yourself. The code obviously isn't assigning the boolean to the player correctly before the DeathMsg, since that's what you're having issues with.
ok. ill add some in and so some testing
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave 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 07:15.


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