Hello.
Is there any way to remove weapons from the ground after accepting a duel, or to block lifting until the end of the round?
I tried something like this:
But after accepting a duel, it does not block at all - unless I remove the id set_task and public start_round - then it blocks even in the next rounds.
Is there any way to remove weapons from the ground after accepting a duel, or to block lifting until the end of the round?
I tried something like this:
Код:
#include <hamsandwich>
#define TASK_START 1122
RegisterHam(Ham_Touch, "weaponbox", "fw_TouchWeapon");
RegisterHam(Ham_Touch, "armoury_entity", "fw_TouchWeapon");
RegisterHam(Ham_Touch, "weapon_shield", "fw_TouchWeapon");
register_logevent("start_round", 2, "1=Round_Start");
public accept_duel(id)
{
set_task(0.1, "fw_TouchWeapon", id + TASK_START);
}
public fw_TouchWeapon(weapon, id)
{
id -= TASK_START;
if (!is_user_connected(id)){
return HAM_IGNORED;
}
return HAM_SUPERCEDE;
}
public start_round(id)
{
remove_task(id + TASK_START);
}