[AMXX] Hostage HP

Vaata eelmist teemat Vaata järgmist teemat Go down

Tonight
Tonight

[AMXX] Hostage HP Vetera11
Liitus : 19/02/2012
Postitusi : 18000

PostitamineTonight 26.02.12 15:26

Plugina autor: AssKicR
Kirjeldus: Selle pluginaga saab lisada hostidele rohkem hp.

CVARs:
mp_hostagehp <1-9999> // 9999 on maksimaalne

Source:
Kood:
#include <amxmodx>
#include <amxmisc>
#include <engine>

public SetHostageHp(id)
{
    new health=get_cvar_num("mp_hostagehp")
    if (health==100) return PLUGIN_HANDLED
    if (health>9999) set_cvar_num("mp_hostagehp",100)
    if (health<=0) set_cvar_num("mp_hostagehp",100)

    new iHos = find_ent_by_class(-1, "hostage_entity")
    while(iHos != 0)
    {
            entity_set_float(iHos, EV_FL_health, get_cvar_float("mp_hostagehp"))
//            client_print(id, 3,"[DEBUG] Hostage with id %d now has %.0f HP", iHos, Entvars_Get_Float(iHos, EV_FL_health))
            iHos = find_ent_by_class(iHos, "hostage_entity")
    }
    new jHos = find_ent_by_class(-1, " monster_scientist")
    while(jHos != 0)
    {
            entity_set_float(jHos, EV_FL_health, get_cvar_float("mp_hostagehp"))
//            client_print(id, 3,"[DEBUG] Hostage with id %d now has %.0f HP", iHos, Entvars_Get_Float(iHos, EV_FL_health))
            iHos = find_ent_by_class(jHos, " monster_scientist")
    }
    return PLUGIN_CONTINUE
}

public plugin_init()
{
    register_plugin("Hostage HP", "1.1", "AssKicR")
    register_cvar("mp_hostagehp","9998") //Max is 9999
    register_event("RoundTime", "SetHostageHp", "bc")
}

DOWNLOAD:
Attachments
[AMXX] Hostage HP Attachment
hostagehp.zip You don't have permission to download attachments.(3 Kb) Downloaded 23 times

Vaata eelmist teemat Vaata järgmist teemat Tagasi üles

Soovid vestluses osaleda?

Selleks logi sisse või tee endale kasutaja.

Liitu foorumiga

Tee endale kasutaja ning osale aruteludes.


Tee uus kasutaja

Logi sisse

Omad foorumis juba kasutajat? Logi sisse.


Logi sisse

 
Permissions in this forum:
Sa ei saa vastata siinsetele teemadele