←  Prośby o Klasę/Perk

AMXX.pl: Support AMX Mod X i SourceMod

»

Klasa
Prosze o 1 klase Major

Locked

  • +
  • -
Alechandro's Photo Alechandro 05.04.2013

Major- klasa premium, dodatkowe 15% obrazen, podwujny skok, 50% obrazen wraca w postaci hp

pociesze sie takze jesl inei bd mial ostatiej umiejetnosci
Quote

  • +
  • -
Alechandro's Photo Alechandro 06.04.2013

refresh :D

oto moje proby zrobienie tej klasy lecz po dodaniu regeneracji hp wyskakuja takie errory

//// codclass_major.sma
// E:\Grom\compiler\codclass_major.sma(32) : error 088: number of arguments does not matc
h definition
// E:\Grom\compiler\codclass_major.sma(49) : error 017: undefined symbol "wartosc"
//
// 2 Errors.
// Could not locate output file compiled\codclass_major.amx (compile failed)


#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Klasa CoD MoD"
#define VERSION "1.0"
#define AUTHOR "LuKoIl"

#define DMG_BULLET (1<<1)

new const nazwa[] = "Major";
new const opis[] = "Dodatkowe 15% obrazen, multi jump, 5% szns na natychmiastowe zabicie, 50% obrazen wraca w postaci hp .";
new const bronie = (1<<CSW_AK47)|(1<<CSW_P228);
new const zdrowie = 0;
new const kondycja = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;

new skoki[33];

new ma_klase[33];

new wartosc_klasy[33];

public plugin_init()
{
register_plugin(nazwa, "1.0", "LuKoIl");

cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc, 45, 50);

register_forward(FM_CmdStart, "fwCmdStart_MultiJump");

RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

}

public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Major] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
give_item(id, "weapon_hegrenade");
ma_klase[id] = true;
wartosc_klasy[id] = wartosc

return COD_CONTINUE;
}

public cod_class_disabled(id)
{
ma_klase[id] = false;

}

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_klase[idattacker])
return HAM_IGNORED;

if(get_user_weapon(idattacker) == CSW_AK47 && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, 7.0, 0.00, idinflictor, damagebits);

if(!(damagebits & DMG_BULLET))
return HAM_IGNORED;

if(get_user_weapon(idattacker) == CSW_AK47 && random_num(1,20) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);


return HAM_IGNORED;
}

public TakeDamagePost(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_alive(idattacker))
return HAM_IGNORED;

if(!ma_klase[idattacker])
return HAM_IGNORED;

new Float:maksymalne_zdrowie = 100.0 + cod_get_user_health(idattacker);
new Float:nowe_zdrowie = damage * (wartosc_klasy[idattacker]/100) + pev(idattacker, pev_health);

set_pev(idattacker, pev_health, (nowe_zdrowie < maksymalne_zdrowie)? nowe_zdrowie: maksymalne_zdrowie);

return HAM_IGNORED;
}

Kawon (09.04.2013 09:31):
Kod w postach (np. źródło pluginu) umieszczaj w odpowiednich tagach (code/php/spoiler itp), a powyżej 200 linijek tylko w załączniku lub na wklejce.
Quote

  • +
  • -
Alechandro's Photo Alechandro 07.04.2013

refresh

proszę o zamknieciezam rozwiazalem problem
Quote

  • +
  • -
Kawon's Photo Kawon 09.04.2013

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Temat zamknięty na prośbę użytkownika.


Z pozdrowieniami,
Zespół AMXX.PL
Quote
Locked