Hello !! well, I am using this plugin and it works correctly, but I would like the event of granting money after defuse to happen 1 or 2 seconds after I have defused,
I think this can be done with the set_task function but I don't know how to apply it.
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <csx>
static const PLUGIN_NAME[] = "Bomb Plant Money Bonus"
static const PLUGIN_VERSION[] = "1.0"
static const PLUGIN_AUTHOR[] = "Locks"
new PCvarBonus
new PCvarDefuseBonus
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
PCvarBonus = register_cvar("amx_plant_bonus", "150")
PCvarDefuseBonus = register_cvar("amx_defuse_bonus", "500") // the defuse bonus could be changed
}
public bomb_planted(id)
{
new money = cs_get_user_money(id)
new bonus = get_pcvar_num(PCvarBonus)
cs_set_user_money(id, money + bonus)
}
public bomb_defused(id)
{
new money = cs_get_user_money(id)
new bonus = get_pcvar_num(PCvarDefuseBonus)
cs_set_user_money(id, money + bonus)
}