#include <amxmod> 
new bool:g_selected = false 

public shield_r(id) {
	if(g_selected)
	{
		new team[32] 
		get_user_team(id,team,32) 
		if (equal(team,"CT")){ 
			set_hudmessage(200, 100, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 3) 
			show_hudmessage(id,"This item can only be bought on CS maps") 
			client_cmd(id,"echo This item can only be bought on CS maps") 
		} 
	}
	return PLUGIN_HANDLED 
}
public checkmap() {
	new currentmap[3]
	get_mapname(currentmap,2)
	if(!equal(currentmap,"cs"))
	{
		g_selected = true
	}
	else
	{
		g_selected = false
	}
}


public plugin_init() { 
   register_plugin("Shield Restriction","1.0","Starscream")
   register_clcmd("shield","shield_r",-1,"shield") 
   server_cmd("amx_restrict item 8")
   checkmap()
} 
