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

Bomb kill instead lvl


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tiny
Senior Member
Join Date: Jun 2004
Location: France
Old 10-01-2010 , 07:22   Bomb kill instead lvl
Reply With Quote #1

Is it possible to have 1 or 2 kills instead of one level when the bomb explodes or is planted?
If yes, can you give me the line and code for it ?

Thanks
__________________
KiKoo et Bisous
Tiny is offline
Tiny
Senior Member
Join Date: Jun 2004
Location: France
Old 10-14-2010 , 17:56   Re: Bomb kill instead lvl
Reply With Quote #2

Up !!!
or down ?
__________________
KiKoo et Bisous
Tiny is offline
SeToY
SourceMod Donor
Join Date: Jul 2006
Location: Germany
Old 10-28-2010 , 03:51   Re: Bomb kill instead lvl
Reply With Quote #3

Should be this one:
Code:
// the bomb explodes
public event_bomb_detonation()
{
    if(!ggActive || get_pcvar_num(gg_bomb_defuse_lvl) != 2 || !c4planter)
        return;
    
    // re-entrancy fix
    static Float:lastThis;
    new Float:now = get_gametime();
    if(now == lastThis) return;
    lastThis = now;

    new id = c4planter;
    c4planter = 0;

    if(!is_user_connected(id)) return;

    if(!equal(lvlWeapon[id],HEGRENADE) && !equal(lvlWeapon[id],KNIFE) && level[id] < weaponNum)
    {
        change_level(id,1);
        //score[id] = 0;
    }
    else if(is_user_alive(id)) refill_ammo(id);
}
There's also a change_score() method which you can use instead of change_level()
__________________
Success is a lousy teacher. It seduces smart people into thinking they can't lose.
- Bill Gates

Quote:
Originally Posted by Hawk552
SeToY is a retard, scumbag and asshole and you shouldn't pretend that he isn't.
SeToY is offline
Tiny
Senior Member
Join Date: Jun 2004
Location: France
Old 10-29-2010 , 20:01   Re: Bomb kill instead lvl
Reply With Quote #4

Going to check it and try it.
Kiss and take care.
__________________
KiKoo et Bisous
Tiny 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 17:22.


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