void NoReload() { static bool noreload = false; if (set.noreload && cheat_state->state == CHEAT_STATE_ACTOR) { struct actor_info *self = actor_info_get(ACTOR_SELF, 0); if (self == NULL) return; int wID = self->weapon[self->weapon_slot].id; if (wID >= 22 && wID <= 24 || wID >= 26 && wID <= 32 || wID >= 37 && wID <= 38 || wID >= 41 && wID <= 42) { int wSlot = pPedSelf->GetCurrentWeaponSlot(); if (self->weapon[self->weapon_slot].ammo_clip == 1) { pPedSelf->SetCurrentWeaponSlot(eWeaponSlot(0)); pPedSelf->SetCurrentWeaponSlot(eWeaponSlot(wSlot)); } } noreload = true; } else if (noreload) { noreload = false; } }