Code:
public AbStartPre2(weaponid) // Ham_Weapon_reload
{
static id
id = get_pdata_int(weaponid, 43, 4)
client_print(id, print_chat, "%n Pressed Reload", id)
if(!cso_is_zombie(id) || is_user_bot(id)) return;
if(get_gametime()-g_LastReload[id] >= 0.1)
{
g_LastReload[id] = get_gametime()
g_PressedReload[id] = true
}
else g_PressedReload[id] = false
}
Earlier made this code for that detecting but didn't really work.. tried to get id with pev(weaponid, pev_owner) but fail
Edit:Either it doesn't get called bcs knife or idk
Edit2: Lol, idk which was the reason the engine button method didn t work first time but now does. and also Thanks!