Raised This Month: $ Target: $400
 0% 

[ZP] Addon: Biohazard Icon for ZP 4.3 with New Modes (assassin, snip, armageddon)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 05-06-2010 , 15:39   Re: [ZP] Addon: Biohazard Icon for ZP 4.3 with New Modes (assassin, snip, armageddon)
Reply With Quote #6

And here is mine version...
Code:
#include < amxmodx >
#include < zombieplaguenew1.3 >

new g_iCurrentGameMode, gmsgStatusIcon, g_MaxPlayers

public plugin_init ( )
{
    register_plugin ( "[ZP] BioHazard Icon", "1.0", "NiHiLaNTh" )
    register_event ( "HLTV", "EV_RoundStart", "a", "1=0", "2=0" )
    gmsgStatusIcon = get_user_msgid ( "StatusIcon" )
    g_MaxPlayers = get_maxplayers ( )
}

public zp_round_started ( GameMode, Player )
{
    g_iCurrentGameMode = GameMode
}

public EV_RoundStart ( )
{
    for ( new i =1; i < g_MaxPlayers; i++ )
    {
        set_task ( 0.1, "show_icon", i, _,_, "b" )
    }
}

public show_icon ( Player )
 {
    if ( !is_user_connected ( Player ) )
        return 
    
    if ( g_iCurrentGameMode == ( MODE_INFECTION | MODE_MULTI ) )
        return
    
    new iRed, iGreen, iBlue
    
    switch ( g_iCurrentGameMode )
    {
        case MODE_NEMESIS:
        {
            iRed = 255
            iGreen = 0
            iBlue = 0
        }
        case MODE_SURVIVOR:
        {
            iRed = 0
            iGreen = 0
            iBlue = 255
        }
        case MODE_SWARM:
        {
            iRed = 255
            iGreen  = 255
            iBlue = 0
        }
        case MODE_PLAGUE:
        {
            iRed = 255
            iGreen = 0
            iBlue = 0
        }
        case MODE_ASSASSIN:
        {
            iRed = 255
            iGreen = 5
            iBlue = 225
        }
        case MODE_SNIPER:
        {
            iRed = 255
            iGreen = 127
            iBlue = 0
        }
        case MODE_LNJ:
        {
            iRed = 30
            iGreen = 230
            iBlue = 230
        }
    }
    
    ShowIcon ( Player, iRed, iGreen, iBlue)
}

public ShowIcon ( Player, iRed, iGreen, iBlue)
{
    message_begin ( MSG_ONE, gmsgStatusIcon, _, Player )
    write_byte ( 1 )
    write_string ( "dmg_bio" )
    write_byte ( iRed )
    write_byte ( iGreen )
    write_byte ( iBlue )
    message_end ( )
}
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
 



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 16:02.


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