←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

CoD Nowy
Proszę o pomoc

Locked

  • +
  • -
mixerowns8's Photo mixerowns8 07.01.2011

Proszę o przerobienie tej klasy na premium flaga B

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <codmod>
#include <cstrike>
#include <fakemeta>
#include <colorchat>

#define DMG_BULLET (1<<1)

new bool:ma_klase[33];
new bool:moze_skoczyc[33];

new CT_Skins[4][] = {"sas","gsg9","urban","gign"};
new Terro_Skins[4][] = {"arctic","leet","guerilla","terror"};

new const nazwa[] = "Zwinny Zolnierz";
new const opis[] = "Ma podwojny skok, zmniejszona grawitacje oraz ubranie wroga";
new const bronie = 1<<CSW_HEGRENADE | 1<<CSW_DEAGLE;
new const zdrowie = 37;
new const kondycja = 60;
new const inteligencja = 5;
new const wytrzymalosc = 0;

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

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

register_forward(FM_CmdStart, "CmdStart");
register_forward(FM_Spawn, "Spawn", 1);
}

public cod_class_enabled(id)
{
ColorChat(id, GREEN, "Klasa %s zostala stworzona przez PluginyMody.webd.pl", nazwa);

set_pev(id, pev_gravity, 0.8);
ZmienUbranie(id, 0);
ma_klase[id] = true;
}

public cod_class_disabled(id)
{
set_pev(id, pev_gravity, 1.0);
ZmienUbranie(id, 1);
ma_klase[id] = false;
}

public CmdStart(id, uc_handle)
{
if(!ma_klase[id])
return FMRES_IGNORED;

new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc[id])
{
moze_skoczyc[id] = false;
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)
moze_skoczyc[id] = true;

return FMRES_IGNORED;
}

public ZmienUbranie(id,reset)
{
if (!is_user_connected(id))
return PLUGIN_CONTINUE;

if (reset)
cs_reset_user_model(id);
else
{
new num = random_num(0,3);
cs_set_user_model(id, (get_user_team(id) == 1)? CT_Skins[num]: Terro_Skins[num]);
}

return PLUGIN_CONTINUE;
}

public Spawn(id)
{
if(!is_user_connected(id)) return;

if(ma_klase[id])
ZmienUbranie(id, 0);
}
Edited by mixerowns8, 07.01.2011 17:44.
Quote
Locked