#include <amxmodx>
#include <reapi>
const ARMOR_VALUE = 100;
const FLAG_ACCESS = ADMIN_LEVEL_H;
public plugin_init() {
register_plugin("Plugin", "0.0.1", "d3m37r4");
RegisterHookChain(RG_CBasePlayer_OnSpawnEquip, "CBasePlayer_OnSpawnEquip_Post", true);
}
public CBasePlayer_OnSpawnEquip_Post(const id) {
if(!is_user_connected(id) || ~get_user_flags(id) & FLAG_ACCESS) {
return HC_CONTINUE;
}
UTIL_give_item(id, "weapon_deagle", GT_REPLACE, 35);
UTIL_give_item(id, "weapon_hegrenade", GT_APPEND, 0);
UTIL_give_item(id, "weapon_flashbang", GT_APPEND, 2);
UTIL_give_item(id, "weapon_smokegrenade", GT_APPEND, 0);
rg_set_user_armor(id, ARMOR_VALUE, ARMOR_VESTHELM);
return HC_CONTINUE;
}
stock UTIL_give_item(const index, const weapon[], GiveType:give_type, ammount) {
rg_give_item(index, weapon, give_type);
if(ammount) {
rg_set_user_bpammo(index, rg_get_weapon_info(weapon, WI_ID), ammount);
}
}