Raised This Month: $ Target: $400
 0% 

Bomb Planted called twice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Apollyon
SourceMod Donor
Join Date: Dec 2007
Location: California
Old 05-08-2010 , 15:15   Re: Bomb Planted called twice
Reply With Quote #1

Thanks Connor, it's working great now.
__________________
Apollyon is offline
Apollyon
SourceMod Donor
Join Date: Dec 2007
Location: California
Old 05-08-2010 , 20:26   Re: Bomb Planted called twice
Reply With Quote #2

I noticed another issue with my edited code above. I was testing with bots and noticed that when the bot planted the bomb I was able to see the "Bonus" chat message. What needs to be changed to make the message only visible to the planter.

EDIT: I just tested with a human player and have the same issue.

Using this code along with Ven's stock solved the problem.
PHP Code:
public eBombPlanted()
{
    new 
id get_loguser_index();
    
    if(
is_user_alive(id) && get_user_team(id) == 1)
    {
        new 
frags 2;
        if(
fragsset_user_frags(id,get_user_frags(id) + frags);
    
        
ColorChat(idRED"[Badlands] ^4Bonus Frags!");
    }
    return 
PLUGIN_CONTINUE;

__________________

Last edited by Apollyon; 05-08-2010 at 22:14.
Apollyon 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 03:40.


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