←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

generator klas

  • +
  • -
White Power - zdjęcie White Power 29.06.2013

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <fakemeta>
        
new const nazwa[]   = "Pomper";
new const opis[]    = "Posiada pompę (xm 1/7)";
new const bronie    = (1<<CSW_XM1014)|(1<<CSW_USP);
new const zdrowie   = 40;
new const kondycja  = 60;
new const inteligencja = 30;
new const wytrzymalosc = 30;
    
new ma_klase[33];
 
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
 
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
 
register_forward(FM_PlayerPreThink, "fwPrethink_Niewidzialnosc", 1);
 
}
 
public cod_class_enabled(id)
{
ma_klase[id] = true;
 
}
 
public cod_class_disabled(id)
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
    ma_klase[id] = false;
 
}
 
 
//Przy kucaniu
public fwPrethink_Niewidzialnosc(id)
{
if(!ma_klase[id])
return;
 
new button = get_user_button(id);
if( button & IN_DUCK )
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 150);
}
else
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
}
}
 
Odpowiedz