Guest User

Untitled

a guest
Aug 1st, 2020
27
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stock bool:GetHasAttributeInAnySlot(client, slot = -1, const attribute[] = HasAttribute, bool:active = false)
  2. {
  3. if (!IsValidClient(client)) return false;
  4.  
  5. if (!active) {
  6. for (new i = 0; i < 4; i++) {
  7. new weapon = GetPlayerWeaponSlot(client, i);
  8. if (weapon != -1) {
  9. if (HasAttribute[weapon]) {
  10. if (attribute[weapon]) {
  11. if (slot == -1 || slot == i) return true;
  12. }}}}
  13. }
  14. if (active) {
  15. if (!IsPlayerAlive(client)) return false;
  16.  
  17. new weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon");
  18. if (weapon != -1) {
  19. if (HasAttribute[weapon]) {
  20. if (attribute[weapon]) return true;
  21. }}
  22. }
  23.  
  24. return false;
  25. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×