is there some simple way to merge multiple tasks into one?
i want to merge three tasks and have one callable function instead of three that i have
here is nothing complex, but i just wonder if it possible
PHP Code:
#include <amxmodx>
#include <fun>
#include <csx>
public plugin_init()
register_plugin("infinite_grenades", "latest", "kww")
public grenade_throw(id, gid, wid) {
switch(wid) {
case CSW_HEGRENADE:
set_task(0.1, "call_he", id)
case CSW_FLASHBANG:
set_task(0.1, "call_fb", id)
case CSW_SMOKEGRENADE:
set_task(0.1, "call_sg", id)
}
return PLUGIN_CONTINUE
}
public call_he(id) give_item(id, "weapon_hegrenade")
public call_fb(id) give_item(id, "weapon_flashbang")
public call_sg(id) give_item(id, "weapon_smokegrenade")