Post by jamal on Jul 13, 2016 14:25:13 GMT
ZP Unlimited Grenade
/* [ZP] Free Grenades
(for human)
BY SPOOKY
*/
#include <amxmodx>
#include <csx>
#include <fakemeta_util>
#include <zombieplague>
new cvar_ern, cvar_s;
public plugin_init()
{
register_plugin("[ZP] Free Grenades", "1.1", "what_fuck");
cvar_ern = register_cvar("zp_grenade_enable", "1");
cvar_s = register_cvar("zp_grenade_time", "1");
}
public grenade_throw(id, entity, weapon) {
if (!get_pcvar_num(cvar_ern) || !is_user_alive(id) || !(get_user_flags(id) & ADMIN_KICK))
return ;
if (weapon == CSW_SMOKEGRENADE)
{
set_task(0.0+get_pcvar_num(cvar_s), "Give_smoke", id)
}
else if (weapon == CSW_FLASHBANG)
{
set_task(0.0+get_pcvar_num(cvar_s), "Give_flash", id)
}
else if (weapon == CSW_HEGRENADE)
{
set_task(0.0+get_pcvar_num(cvar_s), "Give_HE", id)
}
}
public Give_smoke(id) {
if (zp_get_user_nemesis(id) || zp_get_user_zombie(id) || zp_get_user_first_zombie(id) || zp_get_user_last_zombie(id))
return ;
fm_give_item(id, "weapon_smokegrenade")
}
public Give_flash(id) {
if (zp_get_user_nemesis(id) || zp_get_user_zombie(id) || zp_get_user_first_zombie(id) || zp_get_user_last_zombie(id))
return ;
fm_give_item(id, "weapon_flashbang")
}
public Give_HE(id) {
if (zp_get_user_nemesis(id) || zp_get_user_zombie(id) || zp_get_user_first_zombie(id) || zp_get_user_last_zombie(id))
return ;
fm_give_item(id, "weapon_hegrenade")
}
(for human)
BY SPOOKY
*/
#include <amxmodx>
#include <csx>
#include <fakemeta_util>
#include <zombieplague>
new cvar_ern, cvar_s;
public plugin_init()
{
register_plugin("[ZP] Free Grenades", "1.1", "what_fuck");
cvar_ern = register_cvar("zp_grenade_enable", "1");
cvar_s = register_cvar("zp_grenade_time", "1");
}
public grenade_throw(id, entity, weapon) {
if (!get_pcvar_num(cvar_ern) || !is_user_alive(id) || !(get_user_flags(id) & ADMIN_KICK))
return ;
if (weapon == CSW_SMOKEGRENADE)
{
set_task(0.0+get_pcvar_num(cvar_s), "Give_smoke", id)
}
else if (weapon == CSW_FLASHBANG)
{
set_task(0.0+get_pcvar_num(cvar_s), "Give_flash", id)
}
else if (weapon == CSW_HEGRENADE)
{
set_task(0.0+get_pcvar_num(cvar_s), "Give_HE", id)
}
}
public Give_smoke(id) {
if (zp_get_user_nemesis(id) || zp_get_user_zombie(id) || zp_get_user_first_zombie(id) || zp_get_user_last_zombie(id))
return ;
fm_give_item(id, "weapon_smokegrenade")
}
public Give_flash(id) {
if (zp_get_user_nemesis(id) || zp_get_user_zombie(id) || zp_get_user_first_zombie(id) || zp_get_user_last_zombie(id))
return ;
fm_give_item(id, "weapon_flashbang")
}
public Give_HE(id) {
if (zp_get_user_nemesis(id) || zp_get_user_zombie(id) || zp_get_user_first_zombie(id) || zp_get_user_last_zombie(id))
return ;
fm_give_item(id, "weapon_hegrenade")
}