Cześć mam pewien problem, a mianowicie robiłem klasę na serwer cod mod, a później chciałem użyć kompilacji, ale niestety nie działa.
Klasę robiłem generatorem i dodałem kilka rzeczy.
Mógłby ktoś ją za mnie zrobić, albo naprawić ?
Nazwa: Bolek (SuperPremium)
Inteligencja: 0
Zdrowie: 100
Wytrzymałość: 150
Kondycja: 100
Bronie: M4A1, AWP
Opis: 2 skoki, niewidzialność na nożu 10/255, 1/4 z M4A1, 1/1 z he oraz 1/1 z AWP
Flaga: "o" czyli ADMIN_LEVEL_C
Oto mój kod:
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
#define DMG_HEGRENADE (1<<24)
new const nazwa[] = "Bolek (SuperPremium)";
new const opis[] = "2 skoki, 1/1 z he, 1/1 z awp, Posiada M4A1 i 1/4 z niej, niewidzialność na nożu";
new const bronie = (1<<CSW_AWP)|(1<<CSW_M4A1)|(1<<CSW_DEAGLE);
new const zdrowie = 200;
new const kondycja = 100;
new const inteligencja = 0;
new const wytrzymalosc = 150;
new skoki[33];
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_event("CurWeapon", "eventKnife_Niewidzialnosc", "be", "1=1");
register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
registerham(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_C))
{
client_print(id, print_chat, "[Bolek (SuperPremium)] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
ma_klase[id] = false;
}
public eventKnife_Niewidzialnosc(id)
{
if(!ma_klase[id])
return;
if( read_data(2) == CSW_KNIFE )
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 10);
}
else
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
}
}
public fwCmdStart_MultiJump(id, uc_handle)
{
if(!is_user_alive(id) || !ma_klase[id])
return FMRES_IGNORED;
new flags = pev(id, pev_flags);
if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
{
skoki[id]--;
new Float:velocity[3];
pev(id, pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity,velocity);
}
else if(flags & FL_ONGROUND)
skoki[id] = 1;
return FMRES_IGNORED;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_perk[idattacker])
return HAM_IGNORED;
if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_HEGRENADE && damagebits & DMG_HEGRENADE)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_M4A1 && damagebits & DMG_BULLET && random_num(1, 4) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
Użytkownik Voltix edytował ten post 28.01.2015 15:32


Dodatki SourceMod



Temat jest zamknięty


codclass_bolek.amxx







