Raised This Month: $37 Target: $400
 9% 

NO bomb/hostages/vip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadowless
Senior Member
Join Date: May 2018
Location: Republic Of Georgia
Old 01-11-2019 , 02:47   NO bomb/hostages/vip
Reply With Quote #1

please help me with this , noVIP does not work (NObomb & NOhostage WORKS well)


Code:
/*
AMX Mod X script.
Author  : Ramon & fixed by Ghosted
Plugin  : NO bomb/hostages/vip
Version : v 1.0.1
*/

#include <amxmodx>
#include <engine>
#include <fun>

new maxplayers
new plg,host,vip,bomb;
public plugin_init() {
	register_plugin("NO bomb/hostages/vip","1.0.1","Ramon & fixed by Ghosted")
	plg = register_cvar("amx_nobombhos","1")
	bomb = register_cvar("amx_nobomb","0")
	host = register_cvar("amx_nohostages","1")
	vip = register_cvar("amx_novip","1")
	maxplayers = get_maxplayers()
	register_event("RoundTime", "nohos", "bc")
	
	if (!get_pcvar_num(plg))
		return;
	
	removeit()
	
	if (get_pcvar_num(host))
		nohos()
}

public removeit() {
	if (get_pcvar_num(host))
	{
		new fhosr = find_ent_by_class(-1, "func_hostage_rescue")
		while(fhosr > maxplayers)
		{
			entity_set_int(fhosr, EV_INT_flags, FL_KILLME)
			fhosr = find_ent_by_class(fhosr, "func_hostage_rescue") 
		} 
	}
	
	if (get_pcvar_num(bomb))
	{
		new doneonce = 0
		new fbombt = find_ent_by_class(-1, "func_bomb_target")
		while(fbombt > maxplayers)
		{
			entity_set_int(fbombt, EV_INT_flags, FL_KILLME)
			doneonce = 1
			fbombt = find_ent_by_class(fbombt, "func_bomb_target")
		}
		if(doneonce == 1)server_cmd("sv_restartround 1")
		new ibombt = find_ent_by_class(-1, "info_bomb_target")
		while(ibombt > maxplayers)
		{
			entity_set_int(ibombt, EV_INT_flags, FL_KILLME)
			ibombt = find_ent_by_class(ibombt, "info_bomb_target")
		}	
	}
	
	if (get_pcvar_num(vip))
	{
		new fescape = find_ent_by_class(-1, "func_escapezone")
		while(fescape > maxplayers)
		{
			entity_set_int(fescape, EV_INT_flags, FL_KILLME)
			fescape = find_ent_by_class(fescape, "func_escapezone")
		}	
		new fvips = find_ent_by_class(-1, "func_vip_safteyzone")
		while(fvips > maxplayers)
		{
			entity_set_int(fvips, EV_INT_flags, FL_KILLME)
			fvips = find_ent_by_class(fvips, "func_vip_safteyzone")
		}	
		new fvipst = find_ent_by_class(-1, "func_vip_start")
		while(fvipst > maxplayers)
		{
			entity_set_int(fvipst, EV_INT_flags, FL_KILLME)
			fvipst = find_ent_by_class(fvipst, "func_vip_start")
		}	
	}
	return PLUGIN_CONTINUE
}

public nohos() {
	if(get_pcvar_num(plg) && get_pcvar_num(host))
	{
		new iHos = find_ent_by_class(-1, "hostage_entity")
		while(iHos > maxplayers)
		{
			entity_set_int(iHos, EV_INT_flags, FL_KILLME)
			iHos = find_ent_by_class(iHos, "hostage_entity") 
		} 
		new jHos = find_ent_by_class(-1, "monster_scientist")
		while(iHos > maxplayers) 
		{
			entity_set_int(jHos, EV_INT_flags, FL_KILLME)
			iHos = find_ent_by_class(jHos, "monster_scientist") 
		} 
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
__________________
Shadowless is offline
Send a message via ICQ to Shadowless Send a message via MSN to Shadowless Send a message via Yahoo to Shadowless Send a message via Skype™ to Shadowless
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-11-2019 , 07:46   Re: NO bomb/hostages/vip
Reply With Quote #2

Hook pfnSpawn in plugin_precache, compare entity's classname with the classnames that you want to remove, then remove entity and supercede the hook.

https://github.com/evandrocoan/Multi...ve_remover.sma
__________________
Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Aliens vs. Predator Server: 74.91.116.75:27015

Website | Channel | AvP on Discord


Last edited by CrazY.; 01-11-2019 at 07:47.
CrazY. is online now
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old Today , 07:40   Re: NO bomb/hostages/vip
Reply With Quote #3

Quote:
Originally Posted by Shadowless
Then why did you post in scripting help section? Post in requests section instead and don't PM me for help.
__________________
Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Aliens vs. Predator Server: 74.91.116.75:27015

Website | Channel | AvP on Discord


Last edited by CrazY.; Today at 07:40.
CrazY. is online now
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:24.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode