// BLACK PANTHER! from Marvel Comics!
// Hero Originally named Windwalker, changed since there is no such character.

/* CVARS - copy and paste to shconfig.cfg

//Black Panther
blackpanther_level 0

*/

#include <superheromod>

// GLOBAL VARIABLES
new gHeroID
new const gHeroName[] = "Black Panther"
new bool:gHasBlackPanther[SH_MAXSLOTS+1]
//----------------------------------------------------------------------------------------------
public plugin_init()
{
    // Plugin Info
    register_plugin("SUPERHERO Black Panther", SH_VERSION_STR, "AssKicR/JTP10181")

    // DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
    new pcvarLevel = register_cvar("blackpanther_level", "0")

    // FIRE THE EVENT TO CREATE THIS SUPERHERO!
    gHeroID = sh_create_hero(gHeroName, pcvarLevel)
    sh_set_hero_info(gHeroID, "Silent Boots", "Your boots have Vibranium soles that absorb sound")

    // REGISTER EVENTS THIS HERO WILL RESPOND TO!
    register_forward(FM_PlayerPreThink, "blackpanther_prethink")
}
//----------------------------------------------------------------------------------------------
public sh_hero_init(id, heroID, mode)
{
    if ( gHeroID != heroID ) return

    gHasBlackPanther[id] = mode ? true : false

    sh_debug_message(id, 1, "%s %s", gHeroName, mode ? "ADDED" : "DROPPED")
}
//----------------------------------------------------------------------------------------------
public blackpanther_prethink(id)
{
    if ( sh_is_active() && is_user_alive(id) && gHasBlackPanther[id] ) {
        set_pev(id, pev_flTimeStepSound, 999)
    }
}
//----------------------------------------------------------------------------------------------
public client_connect(id)
{
        gHasBlackPanther[id] = false
}
//----------------------------------------------------------------------------------------------