#include <amxmodx>
#include <reapi>
public plugin_init() {
register_plugin("Steam Bonus", "1.1", "ill+F@nToM")
if (!isBlockerMap()) RegisterHookChain(RG_CBasePlayer_Spawn,"Spawn",1)
else pause("ad")
}
public Spawn(id) {
static ArmorType:armortype;
if(!is_user_alive(id) || !is_user_steam(id) || (get_user_flags(id) & 524288) || get_member_game(m_iTotalRoundsPlayed) < 1)return
rg_give_item(id,"weapon_flashbang")
rg_set_user_bpammo(id,WEAPON_FLASHBANG,2)
rg_give_item(id,"weapon_hegrenade")
rg_give_item(id,"weapon_smokegrenade")
if(rg_get_user_armor(id,armortype) < 100) rg_set_user_armor(id,100,ARMOR_VESTHELM)
rg_give_item(id,"weapon_deagle",GT_REPLACE)
rg_set_user_bpammo(id, WEAPON_DEAGLE, 0x23)
message_begin(MSG_ONE_UNRELIABLE,76,.player=id)
write_byte(id)
write_string("^4[STEAM] ^1Вы получили бонус за лицензионную версию игры!")
message_end()
}
isBlockerMap() {
new map[32], prefix[][]={"awp_","aim_","35hp","fy_"}
rh_get_mapname(map, 31)
for(new i; i < sizeof prefix; i++) if(containi(map, prefix[i]) != -1) return 1
return 0
}