←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

CoD Nowy
zlecenie na klasy i perki

  • +
  • -
groundbrkr - zdjęcie groundbrkr 10.12.2011

mógłby ktoś wykonać?

Klasy

Szycior - hp 200 , kondycha 100 , reszta 100, zadaje dodatkowe 500 obrażeń (BEZ INT!)

Miszczu - premium ADMIN_LEVEL_G , HP 300, int 500, reszta 200, zadaje 100 obrażen + int z M4 , ma 3 rakiety

Pasztet - -50 kondycji, krowa, m4, ak, +100 obrażeń bez int z każdej broni.


Assasin - klasa premium, 300 kondycji, na hita z lewego i prawego nożem, ADMIN_LEVEL_F


Klon - dostaje AK oraz M4, może stawiać 1 replikę (ta co odbija obrażenia) na rundę +50 dmg z każdej broni


Perki:

***** Twoja Mac - zadajesz +1000 obrażeń

Szalenstwo - + 10000 HP oraz + 300 obrażeń

Profesjonalny ekwipunek - dostajesz wszystkie bronie

możecie jeszcze dodać jakieś fajne klasy i perki / jak ktos zrobi wszystko to znajde jakieś jego wartościowe posty w innych tematach i postawię więcej plusów !
Odpowiedz

thomas - zdjęcie thomas 10.12.2011

to na nowy COD ?
Odpowiedz

  • +
  • -
Reavi - zdjęcie Reavi 10.12.2011

Szycior - jaka bron?
Miszczu -
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <hamsandwich>
#define DMG_BULLET (1<<1)

new const nazwa[] = "Miszczu";
new const opis[] = "Twój Opis";
new const bronie = (1<<CSW_M4A1);
new const zdrowie = 200;
new const kondycja = 200;
new const inteligencja = 500;
new const wytrzymalosc = 200;

new sprite_blast;
new ilosc_rakiet_gracza[33];
new poprzednia_rakieta_gracza[33];
new bool:ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_touch("rocket", "*" , "DotykRakiety");
RegisterHam(Ham_Spawn, "player", "fwSpawn_Rakiety", 1);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

}
public plugin_precache()
{
sprite_blast = precache_model("sprites/dexplo.spr");
precache_model("models/rpgrocket.mdl");
}
public client_disconnect(id)
{
new entRakiety = find_ent_by_class(0, "rocket");
while(entRakiety > 0)
{
if(entity_get_edict(entRakiety, EV_ENT_owner) == id)
remove_entity(entRakiety);
entRakiety = find_ent_by_class(entRakiety, "rocket");
}
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_G))
{
client_print(id, print_chat, "[] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
ilosc_rakiet_gracza[id] = 3;

return COD_CONTINUE;
}
public cod_class_skill_used(id)
{
if (!ilosc_rakiet_gracza[id])
{
client_print(id, print_center, "Wykorzystales juz wszystkie rakiety!");
}
else
{
if(poprzednia_rakieta_gracza[id] + 2.0 > get_gametime())
{
client_print(id, print_center, "Rakiet mozesz uzywac co 2 sekundy!");
}
else
{
if (is_user_alive(id))
{
poprzednia_rakieta_gracza[id] = floatround(get_gametime());
ilosc_rakiet_gracza[id]--;
new Float: Origin[3], Float: vAngle[3], Float: Velocity[3];
entity_get_vector(id, EV_VEC_v_angle, vAngle);
entity_get_vector(id, EV_VEC_origin , Origin);
new Ent = create_entity("info_target");
entity_set_string(Ent, EV_SZ_classname, "rocket");
entity_set_model(Ent, "models/rpgrocket.mdl");
vAngle[0] *= -1.0;
entity_set_origin(Ent, Origin);
entity_set_vector(Ent, EV_VEC_angles, vAngle);
entity_set_int(Ent, EV_INT_effects, 2);
entity_set_int(Ent, EV_INT_solid, SOLID_BBOX);
entity_set_int(Ent, EV_INT_movetype, MOVETYPE_FLY);
entity_set_edict(Ent, EV_ENT_owner, id);
VelocityByAim(id, 1000 , Velocity);
entity_set_vector(Ent, EV_VEC_velocity ,Velocity);
}
}
}
}
public fwSpawn_Rakiety(id)
{
if(is_user_alive(id))
ilosc_rakiet_gracza[id] = 3;
}
public DotykRakiety(ent)
{
if (!is_valid_ent(ent))
return;
new attacker = entity_get_edict(ent, EV_ENT_owner);

new Float:fOrigin[3];
entity_get_vector(ent, EV_VEC_origin, fOrigin);
new iOrigin[3];
for(new i=0;i<3;i++)
iOrigin[i] = floatround(fOrigin[i]);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
write_byte(TE_EXPLOSION);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_short(sprite_blast);
write_byte(32);
write_byte(20);
write_byte(0);
message_end();
new entlist[33];
new numfound = find_sphere_class(ent, "player", 190.0, entlist, 32);
for (new i=0; i < numfound; i++)
{
new pid = entlist[i];
if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid))
continue;
cod_inflict_damage(attacker, pid, 55.0, 0.9, ent, (1<<24));
}
remove_entity(ent);
}
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_M4A1 && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, 100.0, 0.2, idinflictor, damagebits); // 0.2 odpowiada za obrazenai z inty 1 int = 0.2 dmg 5 int = 1 dmg wiecej

return HAM_IGNORED;
}


reszt dorzucę potem bo muszę spadać
Użytkownik Reavi edytował ten post 10.12.2011 10:50
Odpowiedz

  • +
  • -
groundbrkr - zdjęcie groundbrkr 10.12.2011

szybcior deagle

@2uo tak bo jak na stary to raczej sma bym dał

@edit

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

codclass_miszczu.sma(9) : error 037: invalid string (possibly non-terminated string)

1 Error.
Could not locate output file codclass_miszczu.amxx (compile failed).

jak możesz to daj .amxx
Użytkownik groundbrkr edytował ten post 10.12.2011 10:58
Odpowiedz

thomas - zdjęcie thomas 10.12.2011

Miszczu

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <hamsandwich>
	    
new const nazwa[]   = "MIszczu";
new const opis[]    = "Miszczu - premium ADMIN_LEVEL_G , HP 300, int 500, reszta 200, zadaje 100 obrażen + int z M4 , ma 3 rakiety";
new const bronie    = (1<<CSW_M4A1);
new const zdrowie   = 300;
new const kondycja  = 200;
new const inteligencja = 500;
new const wytrzymalosc = 200;
    
new sprite_blast;
new ilosc_rakiet_gracza[33];
new poprzednia_rakieta_gracza[33];

public plugin_init()
{
    register_plugin(Miszczu, "1.0", "thomas");

    cod_register_class(Miszczu - premium ADMIN_LEVEL_G , HP 300, int 500, reszta 200, zadaje 100 obrażen + int z M4 , ma 3 rakiety);
    register_touch("rocket", "*" , "DotykRakiety");
    RegisterHam(Ham_Spawn, "player", "fwSpawn_Rakiety", 1);

}

public plugin_precache()
{

    sprite_blast = precache_model("sprites/dexplo.spr");
    precache_model("models/rpgrocket.mdl");

}

public client_disconnect(id)
{

    new entRakiety = find_ent_by_class(0, "rocket");
    while(entRakiety > 0)
    {
        if(entity_get_edict(entRakiety, EV_ENT_owner) == id)
            remove_entity(entRakiety);
        entRakiety = find_ent_by_class(entRakiety, "rocket");
    }

}

public cod_class_enabled(id)
{
    if(!(get_user_flags(id) & ADMIN_LEVEL_G))
    {
        client_print(id, print_chat, "[MIszczu] Nie masz uprawnien, aby uzywac tej klasy.")
        return COD_STOP;
    }

    ilosc_rakiet_gracza[id] = 3;
   
    return COD_CONTINUE;
}

public cod_class_skill_used(id)
{

    if (!ilosc_rakiet_gracza[id])
    {
        client_print(id, print_center, "Wykorzystales juz wszystkie rakiety!");
    }
    else
    {
        if(poprzednia_rakieta_gracza[id] + 2.0 > get_gametime())
        {
            client_print(id, print_center, "Rakiet mozesz uzywac co 2 sekundy!");
        }

        else
        {
            if (is_user_alive(id))
            {
                poprzednia_rakieta_gracza[id] = floatround(get_gametime());
                ilosc_rakiet_gracza[id]--;

                new Float: Origin[3], Float: vAngle[3], Float: Velocity[3];

                entity_get_vector(id, EV_VEC_v_angle, vAngle);
                entity_get_vector(id, EV_VEC_origin , Origin);

                new Ent = create_entity("info_target");

                entity_set_string(Ent, EV_SZ_classname, "rocket");
                entity_set_model(Ent, "models/rpgrocket.mdl");

                vAngle[0] *= -1.0;

                entity_set_origin(Ent, Origin);
                entity_set_vector(Ent, EV_VEC_angles, vAngle);

                entity_set_int(Ent, EV_INT_effects, 2);
                entity_set_int(Ent, EV_INT_solid, SOLID_BBOX);
                entity_set_int(Ent, EV_INT_movetype, MOVETYPE_FLY);
                entity_set_edict(Ent, EV_ENT_owner, id);

                VelocityByAim(id, 1000 , Velocity);
                entity_set_vector(Ent, EV_VEC_velocity ,Velocity);
            }
        }
    }

}

public fwSpawn_Rakiety(id)
{
    if(is_user_alive(id))
        ilosc_rakiet_gracza[id] = 3;
}

public DotykRakiety(ent)
{
    if (!is_valid_ent(ent))
        return;

    new attacker = entity_get_edict(ent, EV_ENT_owner);


    new Float:fOrigin[3];
    entity_get_vector(ent, EV_VEC_origin, fOrigin);

    new iOrigin[3];
    for(new i=0;i<3;i++)
        iOrigin[i] = floatround(fOrigin[i]);

    message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
    write_byte(TE_EXPLOSION);
    write_coord(iOrigin[0]);
    write_coord(iOrigin[1]);
    write_coord(iOrigin[2]);
    write_short(sprite_blast);
    write_byte(32);
    write_byte(20);
    write_byte(0);
    message_end();

    new entlist[33];
    new numfound = find_sphere_class(ent, "player", 190.0, entlist, 32);

    for (new i=0; i < numfound; i++)
    {
        new pid = entlist[i];

        if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid))
            continue;
        cod_inflict_damage(attacker, pid, 55.0, 0.9, ent, (1<<24));
    }
    remove_entity(ent);
}


Pasztet

#include <amxmodx>
#include <amxmisc>
#include <codmod>
	    
new const nazwa[]   = "Pasztet";
new const opis[]    = "Pasztet - -50 kondycji, krowa, m4, ak, +100 obrażeń bez int z każdej broni.";
new const bronie    = (1<<CSW_M249)|(1<<CSW_M4A1)|(1<<CSW_AK47);
new const zdrowie   = 150;
new const kondycja  = -50;
new const inteligencja = 0;
new const wytrzymalosc = 0;
    
public plugin_init()
{
    register_plugin(klasa, "1.0", "thomas");

    cod_register_class(Pasztet - -50 kondycji, krowa, m4, ak, +100 obrażeń bez int z każdej broni.);
}
Odpowiedz

  • +
  • -
Chmielik - zdjęcie Chmielik 10.12.2011

@UP , ja skompilowałem i było bez błędów.

Załączone pliki

Odpowiedz

  • +
  • -
FORMOZA - zdjęcie FORMOZA 10.12.2011

Chapaj:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <hamsandwich>
#include <codmod>
new const perk_name[] = "Szalenstwo";
new const perk_desc[] = "Dostajesz 10000 HP Zadajesz 300 obrazen wiecej";
new bool:ma_perk[33];
public plugin_init()
{
register_plugin(perk_name, "1.0", "QTM_Peyote");

cod_register_perk(perk_name, perk_desc);

RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_perk_enabled(id)
{
cod_set_user_bonus_health(id, cod_get_user_health(id, 0, 0)+1000);
ma_perk[id] = true;
}

public cod_perk_disabled(id)
{
cod_set_user_bonus_health(id, cod_get_user_health(id, 0, 0)-1000);
ma_perk[id] = false;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;

if(ma_perk[idattacker])
cod_inflict_damage(idattacker, this, 300.0, idinflictor);
return HAM_IGNORED;
}


Załączony plik  codperk_szalenstwo.amxx   2,69 KB   1 Ilość pobrań

Załączony plik  codperk_szalenstwo.sma   966 bajtów   38 Ilość pobrań

Załączone pliki


Użytkownik Acze edytował ten post 10.12.2011 11:14
Odpowiedz

  • +
  • -
groundbrkr - zdjęcie groundbrkr 10.12.2011

@2up

pasztet wtf? coś źle? ; d
Odpowiedz

  • +
  • -
groundbrkr - zdjęcie groundbrkr 10.12.2011

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

codclass_miszczu.sma(21) : error 017: undefined symbol "Miszczu"
codclass_miszczu.sma(21) : warning 215: expression has no effect
codclass_miszczu.sma(21) : warning 215: expression has no effect
codclass_miszczu.sma(21) : error 001: expected token: ";", but found ")"
codclass_miszczu.sma(21) : error 029: invalid expression, assumed zero
codclass_miszczu.sma(21) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.

możecie tez podawać te klasy w .amxx? (opis normalny ;d ma być a nie skopiowany...)

miszczu nie działa + dmg.

odświeżam !@
Odpowiedz

  • +
  • -
Reavi - zdjęcie Reavi 10.12.2011

Szycior,assasin,Miszczu w zalacznikach

Załączone pliki

Odpowiedz

  • +
  • -
groundbrkr - zdjęcie groundbrkr 10.12.2011

Reavi jak działa to super.

bo poprzednie wersje to + dmg nie działało :(
Odpowiedz

  • +
  • -
Reavi - zdjęcie Reavi 10.12.2011

Ja też miałem problem z dodatkowym dmg jak te ci nie będą działać to spróbuje zrobić innym sposobem ;P ^^
Odpowiedz

  • +
  • -
groundbrkr - zdjęcie groundbrkr 10.12.2011

nadal nie działa

mógłbyś mi podać .sma jak już zrobisz? chcę coś zobaczyć co robiłem źle. (dmg nie działa)
Odpowiedz

  • +
  • -
Reavi - zdjęcie Reavi 10.12.2011

Jak tak piszesz to napisz w którym nie działa bo nie wiem co mam zrobić ;PP

tutaj masz miszczu zamieniłem tylko 200% obrażeń + dodatkowe dmg z inta na 1 wyjdzie ( tak mi się wydaje ^^ ) 2pkt = 1 % więcej dmg

Załączone pliki


Użytkownik Reavi edytował ten post 10.12.2011 17:17
Odpowiedz

  • +
  • -
groundbrkr - zdjęcie groundbrkr 10.12.2011

miszczu już sprawdzam, ale chodzi mi o klasę z deagle i 500 dmg!

ale robię teraz inaczej, jako że mam statystykę obrażenia , to dodam ją w bazowych.
Odpowiedz

  • +
  • -
Mordek - zdjęcie Mordek 11.12.2011

A możesz dać sma asasina? Ka tutaj od groundbrkr tylko on teraz nie może ;] Chciałbym nazwę zmienić i opis.
Oraz jak możesz dodaj dla tej klasy specjalny model jakiegoś assasyna :D
Odpowiedz

  • +
  • -
Reavi - zdjęcie Reavi 11.12.2011

sma nie mam bo robiłem na gotowo i usuwałem plik.Lecz zrobiłem od nowa
*sma:


#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <colorchat>
#include <hamsandwich>
#include <cstrike>


new const nazwa[] = "Assasin"; // nazwa
new const opis[] = ""; // opis
new const bronie = 0; // bronie
new const zdrowie = 0;
new const kondycja = 300;
new const inteligencja = 0;
new const wytrzymalosc = 0;

new ma_klase[33];

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

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

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

}

public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_F)) // FLAGA
{
client_print(id, print_chat, "Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
ma_klase[id] = true;


return COD_CONTINUE;
}

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

}

public fwTakeDamage_JedenCios(id, ent, attacker)
{
if(is_user_alive(attacker) && ma_klase[attacker] && get_user_weapon(attacker) == CSW_KNIFE)
{
cs_set_user_armor(id, 0, CS_ARMOR_NONE);
SetHamParamFloat(4, float(get_user_health(id) + 1));
return HAM_HANDLED;
}
return HAM_IGNORED;
}



Do autora klasa Klon:



/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <colorchat>
#include <engine>
#include <hamsandwich>

new const nazwa[] = "Klon";
new const opis[] = "Moze stawiac swoje Klony-Odbijają obrażenia!";
new const bronie = 1<<CSW_AK47 | 1<<CSW_M4A1
new const zdrowie = 20;
new const kondycja = 40;
new const inteligencja = 10;
new const wytrzymalosc = 10;

new pcvar_ilosc_replik, pcvar_hp_replik;

new ilosc_kukiel[33];

new sprite_blast;

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

cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "info_target", "TakeDamage");
RegisterHam(Ham_Spawn, "player", "Spawn", 1);

register_event("HLTV", "NowaRunda", "a", "1=0", "2=0");

pcvar_ilosc_replik = register_cvar("ilosc_replik", "1");
pcvar_hp_replik = register_cvar("hp_replik", "200");
}

public plugin_precache()
sprite_blast = precache_model("sprites/dexplo.spr");

public cod_class_enabled(id)
{
Spawn(id);
}

public cod_class_skill_used(id)
{
if(ilosc_kukiel[id] < 1)
{
client_print(id, print_center, "[Klon]Wykorzystales wszystkie Klony!");
return;
}

new Float:OriginGracza[3], Float:OriginKukly[3], Float:VBA[3];
entity_get_vector(id, EV_VEC_origin, OriginGracza);
VelocityByAim(id, 50, VBA);

VBA[2] = 0.0;

for(new i=0; i < 3; i++)
OriginKukly[i] = OriginGracza[i]+VBA[i];

if(get_distance_f(OriginKukly, OriginGracza) < 40.0)
{
client_print(id, print_center, "[Klon]Muszisz postawic Klona dalej!");
return;
}

new model[55], Float:AngleKukly[3],

SekwencjaKukly = entity_get_int(id, EV_INT_gaitsequence);
SekwencjaKukly = SekwencjaKukly == 3 || SekwencjaKukly == 4? 1: SekwencjaKukly;

entity_get_string(id, EV_SZ_model, model, 54);
entity_get_vector(id, EV_VEC_angles, AngleKukly);

AngleKukly[0] = 0.0;

new ent = create_entity("info_target");

entity_set_string(ent, EV_SZ_classname, "Kukla");
entity_set_model(ent, model);
entity_set_vector(ent, EV_VEC_origin, OriginKukly);
entity_set_vector(ent, EV_VEC_angles, AngleKukly);
entity_set_vector(ent, EV_VEC_v_angle, AngleKukly);
entity_set_int(ent, EV_INT_sequence, SekwencjaKukly);
entity_set_int(ent, EV_INT_solid, SOLID_BBOX);
entity_set_float(ent, EV_FL_health, get_pcvar_float(pcvar_hp_replik));
entity_set_float(ent, EV_FL_takedamage, DAMAGE_YES);
entity_set_size(ent, Float:{-16.0,-16.0, -36.0}, Float:{16.0,16.0, 40.0});
entity_set_int(ent, EV_INT_iuser1, id);

ilosc_kukiel[id]--;
}

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

new classname[33];
entity_get_string(this, EV_SZ_classname, classname, 32);

if(!equal(classname, "Kukla"))
return HAM_IGNORED;

new owner = entity_get_int(this, EV_INT_iuser1);

if(get_user_team(owner) == get_user_team(idattacker))
return HAM_SUPERCEDE;

new bool:bez_obrazen = get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET

if(!bez_obrazen)
cod_inflict_damage(owner, idattacker, damage, 0.3, this, damagebits);

new Float:fOrigin[3], iOrigin[3];

entity_get_vector(this, EV_VEC_origin, fOrigin);

FVecIVec(fOrigin, iOrigin);

if(damage > entity_get_float(this, EV_FL_health))
{
if(!bez_obrazen)
{
new entlist[33];
new numfound = find_sphere_class(this, "player", 190.0, entlist, 32);

for (new i=0; i < numfound; i++)
{
new pid = entlist[i];

if (!is_user_alive(pid) || get_user_team(owner) == get_user_team(pid))
continue;
cod_inflict_damage(owner, pid, 70.0, 0.3, this, (1<<24));
}
}

message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
write_byte(TE_EXPLOSION);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_short(sprite_blast);
write_byte(32);
write_byte(20);
write_byte(0);
message_end();
}

return HAM_IGNORED;
}

public Spawn(id)
ilosc_kukiel[id] = get_pcvar_num(pcvar_ilosc_replik);

public NowaRunda()
remove_entity_name("Kukla")



PS: znajdz model jakis to może wstawie (ja też od niedawna w tym jestem ;))
Hiroshima (12.12.2011 09:56):
Dodając na forum załącznik upewnij się czy nie ma on reklam do innego serwisu.

Użytkownik Hiroshima edytował ten post 12.12.2011 09:55
Odpowiedz

sekio - zdjęcie sekio 12.12.2011

@up
Z edytuj i usuń reklamę a nie niby pomagasz a chcesz sobie zareklamować forum.
Odpowiedz

  • +
  • -
Reavi - zdjęcie Reavi 12.12.2011

@up przepraszam

Klasa pasztet:
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <hamsandwich>
#define DMG_BULLET (1<<1)

new const nazwa[] = "Pasztet";
new const opis[] = "+100 obrażeń z każdej broni.";
new const bronie = (1<<CSW_M249)|(1<<CSW_M4A1)|(1<<CSW_AK47);
new const zdrowie = 0;
new const kondycja = -50;
new const inteligencja = 0;
new const wytrzymalosc = 0;

new bool:ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
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, 100.0, 0.0, idinflictor, damagebits);
if(get_user_weapon(idattacker) == CSW_M4A1 && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, 100.0, 0.0, idinflictor, damagebits);
if(get_user_weapon(idattacker) == CSW_M249 && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, 100.0, 0.0, idinflictor, damagebits);

return HAM_IGNORED;
}
Odpowiedz