Chodzi mi o to jak to zrobic ale jak by ktos mog zrobic bylby widzeczny i oczywiscie + daje
proszę o pomoc
SMA klasy
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <cstrike>
#include <fakemeta>
new DEAGLE_MODEL[ 64 ] = "models/v_deagle_new.mdl"
new const nazwa[] = "Deagle Sniper";
new const opis[] = "Dostajesz specjalnego deagla, ktory ma zoom";
new const bronie = 1<<CSW_DEAGLE;
new const zdrowie = 30;
new const kondycja = 25;
new const inteligencja = 10;
new const wytrzymalosc = 10;
new bool:ma_klase[33];
new g_hasZoom[33];
new szClip, szAmmo
public plugin_init() {
register_plugin("DeagleSniper", "1.1", "ToJaTwojTelefon");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event( "CurWeapon", "event_cur_weapon", "be", "1=1" )
register_forward( FM_CmdStart, "forward_cmdstart" )
}
public plugin_precache()
{
precache_model( DEAGLE_MODEL )
}
public cod_class_enabled(id)
{
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
}
public forward_cmdstart( id, uc_handle, seed )
{
new szWeapID = get_user_weapon( id, szClip, szAmmo )
if( !is_user_alive( id ) )
return PLUGIN_HANDLED
if(!ma_klase[id])
return PLUGIN_HANDLED
if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
{
if( szWeapID == CSW_DEAGLE && !g_hasZoom[ id ] )
{
g_hasZoom[ id ] = true
cs_set_user_zoom( id, CS_SET_FIRST_ZOOM, 1 )
emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
}
else
{ if( g_hasZoom[ id ] )
{
g_hasZoom[ id ] = false
cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
}
}
return PLUGIN_HANDLED
}
if((get_uc(uc_handle, UC_Buttons) & IN_RELOAD) && !(pev(id, pev_oldbuttons) & IN_RELOAD))
{
if(szWeapID == CSW_DEAGLE && g_hasZoom[id])
{
g_hasZoom[id] = false
cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
}
}
return PLUGIN_HANDLED
}
public event_cur_weapon( id )
{
new szWeapID = get_user_weapon( id, szClip, szAmmo )
if ( szWeapID == CSW_DEAGLE && ma_klase[id])
{
set_pev( id, pev_viewmodel2, DEAGLE_MODEL )
}
}