Witam mam dość dziwny problem niestety nie potrafie go naprawić
niestety broń nie zadaje większych obrażeń ;/
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <gunxpmod>
#include <engine>
#include <cstrike>
new PLUGIN_NAME[] = "UNLOCK : G3SG1"
new PLUGIN_AUTHOR[] = "xbatista"
new PLUGIN_VERSION[] = "1.0"
new const WEAPON_V_MDL[] = "models/over-shot/v_g3sg1.mdl";
#define WEAPON_CSW CSW_G3SG1
new const weapon_n[] = "weapon_g3sg1";
const m_pPlayer = 41;
const m_flPrimaryAttack = 46;
#define IsPlayer(%1) ( 1 <= %1 <= g_maxplayers )
new damage_weapon;
new g_maxplayers;
new bool:g_Weapon[33];
new Float:cl_pushangle[33][3];
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_gxm_item("Ulepszone G3SG1", "10000.0 DMG", 1200)
damage_weapon = register_cvar("gxm_damage_dg","100000.0"); // damage multiplier
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1");
RegisterHam( Ham_Weapon_PrimaryAttack, weapon_n, "Fwd_AttackSpeedPre");
RegisterHam(Ham_TakeDamage, "player", "Ham_DamageWeapon");
register_forward( FM_CmdStart, "Fwd_CmdStart" );
g_maxplayers = get_maxplayers();
}
public gxm_item_enabled(id)
{
g_Weapon[id] = true;
}
public client_connect(id)
{
g_Weapon[id] = false;
}
public plugin_precache()
{
engfunc(EngFunc_PrecacheModel, WEAPON_V_MDL);
}
public Fwd_AttackSpeedPre(Ent)
{
new id = pev(Ent,pev_owner);
entity_get_vector( id, EV_VEC_punchangle, cl_pushangle[id]);
}
public Ham_DamageWeapon(id, inflictor, attacker, Float:damage, damagebits)
{
if ( !IsPlayer(attacker) || !g_Weapon[attacker] )
return HAM_IGNORED;
new weapon2 = get_user_weapon(attacker, _, _);
if( weapon2 == WEAPON_CSW)
{
SetHamParamFloat(4, damage * get_pcvar_float(damage_weapon));
}
return HAM_IGNORED;
}
public Event_CurWeapon(id)
{
if ( !g_Weapon[id] || !is_user_alive(id) )
return PLUGIN_CONTINUE;
new Gun = read_data(2)
if( Gun == WEAPON_CSW)
{
entity_set_string(id, EV_SZ_viewmodel, WEAPON_V_MDL)
}
return PLUGIN_CONTINUE;
}


Dodatki SourceMod



Temat jest zamknięty









