2015-06-30 12:46:07 +03:00
|
|
|
#include "precompiled.h"
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C9MMAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C9MMAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C9MMAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_9MM_BUY, "9mm") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_9mm, C9MMAmmo, CCS9MMAmmo);
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void CBuckShotAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_shotbox.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void CBuckShotAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_shotbox.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
|
|
|
}
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL CBuckShotAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_BUCKSHOT_BUY, "buckshot") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
|
|
|
}
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_buckshot, CBuckShotAmmo, CCSBuckShotAmmo);
|
2015-08-20 13:35:01 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C556NatoAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
2015-08-20 13:35:01 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C556NatoAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C556NatoAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_556NATO_BUY, "556Nato") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_556nato, C556NatoAmmo, CCS556NatoAmmo);
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C556NatoBoxAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C556NatoBoxAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C556NatoBoxAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_556NATOBOX_BUY, "556NatoBox") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_556natobox, C556NatoBoxAmmo, CCS556NatoBoxAmmo);
|
2015-08-20 13:35:01 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C762NatoAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C762NatoAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C762NatoAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_762NATO_BUY, "762Nato") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_762nato, C762NatoAmmo, CCS762NatoAmmo);
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C45ACPAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C45ACPAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C45ACPAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_45ACP_BUY, "45acp") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_45acp, C45ACPAmmo, CCS45ACPAmmo);
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C50AEAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C50AEAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C50AEAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_50AE_BUY, "50AE") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_50ae, C50AEAmmo, CCS50AEAmmo);
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C338MagnumAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C338MagnumAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C338MagnumAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_338MAG_BUY, "338Magnum") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_338magnum, C338MagnumAmmo, CCS338MagnumAmmo);
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C57MMAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C57MMAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C57MMAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_57MM_BUY, "57mm") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_57mm, C57MMAmmo, CCS57MMAmmo);
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C357SIGAmmo::__MAKE_VHOOK(Spawn)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
Precache();
|
|
|
|
SET_MODEL(ENT(pev), "models/w_9mmclip.mdl");
|
|
|
|
CBasePlayerAmmo::Spawn();
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-02-04 03:18:26 +03:00
|
|
|
void C357SIGAmmo::__MAKE_VHOOK(Precache)()
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
PRECACHE_MODEL("models/w_9mmclip.mdl");
|
|
|
|
PRECACHE_SOUND("items/9mmclip1.wav");
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2015-08-20 13:35:01 +03:00
|
|
|
BOOL C357SIGAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther)
|
|
|
|
{
|
2016-12-06 22:21:52 +03:00
|
|
|
if (pOther->GiveAmmo(AMMO_357SIG_BUY, "357SIG") == -1)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM);
|
|
|
|
return TRUE;
|
2015-06-30 12:46:07 +03:00
|
|
|
}
|
|
|
|
|
2016-03-17 20:44:52 +03:00
|
|
|
LINK_ENTITY_TO_CLASS(ammo_357sig, C357SIGAmmo, CCS357SIGAmmo);
|