←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

CoD Nowy
[ROZWIĄZANE] Szybcior-> błędy podczas...

Locked

Anty's Photo Anty 10.04.2012

#include <amxmodx>
#include <amxmisc>
#include <codmod>

new const nazwa[] = "Szybcior";
new const opis[] = "";
new const bronie = (1<<CSW_M4A1)|(1<<CSW_DEAGLE)|(1<<CSW_AK47);
new const zdrowie = 10;
new const kondycja = 50;
new const inteligencja = 0;
new const wytrzymalosc = 0;
#define RELOAD_RATIO 0.2
new bool:ma_klase[33];

const NOCLIP_WPN_BS = ((1<<2)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))
const SHOTGUNS_BS = ((1<<CSW_M3)|(1<<CSW_XM1014))
// weapons offsets
const m_pPlayer = 41
const m_iId = 43
const m_flTimeWeaponIdle = 48
const m_fInReload = 54
const m_flNextAttack = 83
stock const Float:g_fDelay[CSW_P90+1] = {
0.00, 2.70, 0.00, 2.00, 0.00, 0.55, 0.00, 3.15, 3.30, 0.00, 4.50,
2.70, 3.50, 3.35, 2.45, 3.30, 2.70, 2.20, 2.50, 2.63, 4.70,
0.55, 3.05, 2.12, 3.50, 0.00, 2.20, 3.00, 2.45, 0.00, 3.40
}
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
new szWeapon[17]
for(new i=1; i<=CSW_P90; i++)
{
if( !(NOCLIP_WPN_BS & (1<<i)) && get_weaponname(i, szWeapon, charsmax(szWeapon)) )
{
if( !(SHOTGUNS_BS & (1<<i)) )
{
RegisterHam(Ham_Weapon_Reload, szWeapon, "Weapon_Reload_Post", 1)
}
}
}
}
public cod_class_enabled(id)
{
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
}
public Weapon_Reload_Post(iEnt)
{
if( get_pdata_int(iEnt, m_fInReload, 4) )
{
new id = get_pdata_cbase(iEnt, m_pPlayer, 4)
new Float:fDelay = g_fDelay[get_pdata_int(iEnt, m_iId, 4)] * RELOAD_RATIO
set_pdata_float(id, m_flNextAttack, fDelay, 5)
set_pdata_float(iEnt, m_flTimeWeaponIdle, fDelay + 0.5, 4)
}
}


Proszę o pomoc
Quote

Anty's Photo Anty 11.04.2012

@REFRESH
Quote

  • +
  • -
VerShinin's Photo VerShinin 11.04.2012

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <hamsandwich>
#include <fakemeta>
new const nazwa[] = "Szybcior";
new const opis[] = "";
new const bronie = (1<<CSW_M4A1)|(1<<CSW_DEAGLE)|(1<<CSW_AK47);
new const zdrowie = 10;
new const kondycja = 50;
new const inteligencja = 0;
new const wytrzymalosc = 0;
#define RELOAD_RATIO 0.2
new bool:ma_klase[33];
const NOCLIP_WPN_BS = ((1<<2)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))
const SHOTGUNS_BS = ((1<<CSW_M3)|(1<<CSW_XM1014))
// weapons offsets
const m_pPlayer = 41
const m_iId = 43
const m_flTimeWeaponIdle = 48
const m_fInReload = 54
const m_flNextAttack = 83
stock const Float:g_fDelay[CSW_P90+1] = {
0.00, 2.70, 0.00, 2.00, 0.00, 0.55, 0.00, 3.15, 3.30, 0.00, 4.50,
2.70, 3.50, 3.35, 2.45, 3.30, 2.70, 2.20, 2.50, 2.63, 4.70,
0.55, 3.05, 2.12, 3.50, 0.00, 2.20, 3.00, 2.45, 0.00, 3.40
}
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
new szWeapon[17]
for(new i=1; i<=CSW_P90; i++)
{
if( !(NOCLIP_WPN_BS & (1<<i)) && get_weaponname(i, szWeapon, charsmax(szWeapon)) )
{
if( !(SHOTGUNS_BS & (1<<i)) )
{
RegisterHam(Ham_Weapon_Reload, szWeapon, "Weapon_Reload_Post", 1)
}
}
}
}
public cod_class_enabled(id)
{
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
}
public Weapon_Reload_Post(iEnt)
{
if( get_pdata_int(iEnt, m_fInReload, 4) )
{
new id = get_pdata_cbase(iEnt, m_pPlayer, 4)
new Float:fDelay = g_fDelay[get_pdata_int(iEnt, m_iId, 4)] * RELOAD_RATIO
set_pdata_float(id, m_flNextAttack, fDelay, 5)
set_pdata_float(iEnt, m_flTimeWeaponIdle, fDelay + 0.5, 4)
}
}
Quote

Anty's Photo Anty 12.04.2012

Dzięki można zamknąć
Quote

  • +
  • -
Goliath's Photo Goliath 13.04.2012

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Pomoc udzielona

Jeśli się z tym nie zgadzasz, Posted Image raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL
Quote
Locked