Raised This Month: $ Target: $400
 0% 

Plugin: Snipermode


Post New Thread Reply   
 
Thread Tools Display Modes
Noizza
Senior Member
Join Date: Apr 2004
Location: Vienna (PROUD)
Old 07-12-2005 , 19:42  
Reply With Quote #11

nice work^^
dont thought thats such hard to remove buyzones ^^
thx...
__________________
Quote:
Originally Posted by Johnny got his gun
Read the plugin posting rules. They apply to everyone, including you.
kk...
#include <noizza>
lol

try my Server!
193.53.80.122:27016 Super-Fun Server [SHmod+DM]
Noizza is offline
Send a message via ICQ to Noizza
Noizza
Senior Member
Join Date: Apr 2004
Location: Vienna (PROUD)
Old 07-12-2005 , 20:25  
Reply With Quote #12

pffff... dont get it... tried everything...
whats wrong?

the buyzones arent disabled if i do it with "if(mode)"
and if not they are disabled all the time^^...

Code:
#include <amxmodx>
#include <engine>
#include <fun>
#include <cstrike>

public plugin_init()
{
	register_plugin("Snipermode","0.5","Noizza/v3x")
	register_cvar("amx_snipermode","0")
	register_logevent("roundstart",2,"0=World triggered","1=Round_Start")
}
public plugin_precache() {
		disable_buyzone(); // disable buying
		// do it in precache because it is done earlier than plugin_init, and it MIGHT matter
	}
	
	public disable_buyzone() {
	new mode = get_cvar_num("amx_snipermode")
	if(mode) {
		// find that info entity
		new ent = find_ent_by_class(-1,"info_map_parameters");
		
		// if we couldn't find one, make our own
		if(!ent) {
			ent = create_entity("info_map_parameters");
		}
		
		// disable buying for both teams
		DispatchKeyValue(ent,"buying","3");
		DispatchSpawn(ent);
		
	} 	
}
public roundstart() {
	for(new id = 1; id <= get_maxplayers(); id++) 
	{
		new mode = get_cvar_num("amx_snipermode")
		new is_connected = is_user_connected(id)
		new is_alive = is_user_alive(id)
		
		if(mode)
			{
			if( !(is_connected) || !(is_alive) ) continue
				
			give_item(id,"weapon_scout")
			give_item(id,"weapon_awp")
			give_item(id,"weapon_deagle")
			give_item(id,"weapon_usp")
			give_item(id,"weapon_glock")
			give_item(id,"weapon_hegrenade")
			give_item(id,"weapon_flashbang")
			cs_set_user_bpammo(id,CSW_SCOUT,20)
			cs_set_user_bpammo(id,CSW_AWP,20)
			cs_set_user_bpammo(id,CSW_DEAGLE,35)
			cs_set_user_bpammo(id,CSW_USP,60)
			set_user_armor(id,100)
			cs_set_user_defuse(id,1)
		}
	}
	
	return PLUGIN_CONTINUE
}
__________________
Quote:
Originally Posted by Johnny got his gun
Read the plugin posting rules. They apply to everyone, including you.
kk...
#include <noizza>
lol

try my Server!
193.53.80.122:27016 Super-Fun Server [SHmod+DM]
Noizza is offline
Send a message via ICQ to Noizza
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 07-13-2005 , 06:03  
Reply With Quote #13

Code:
if (get_cvar_num("irocktothecore") == 1) then
[/small]
__________________
Plugins:
none

n0obie4life is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 07-13-2005 , 06:12  
Reply With Quote #14

Not following the rules, eh?
Johnny got his gun is offline
Reply



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 19:13.


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