#include <amxmodx>
#include <cstrike>
#include <fun>
#include <unlocksystemmod>

#define PLUGIN "Secondary Weapon: Glock"
#define VERSION "1.0"
#define AUTHOR "Switch"

new g_glock

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public plugin_precache()
{
	g_glock = unlock_register_weapon("Glock", WEAPON_SECONDARY, 0)
}

public wpn_selected_post(id, wpnid)
{
	if(wpnid == g_glock) get_glock(id)
}

public get_glock(id)
{
	give_item(id, "weapon_glock18")
	cs_set_user_bpammo(id, CSW_GLOCK18, 200)
}
