Raised This Month: $ Target: $400
 0% 

Armoury killed?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-05-2015 , 04:15   Armoury killed?
Reply With Quote #1

When i pick some armoury gun, does the armoury gets killed?
I want to know if i can register ham_killed for armoury or if i will have to register touch. Because i want to spawn armoury again after x seconds and if ham_killed works, it would be better because i wouldnt need to check if the weapon was picked up (Since players may have a primary gun already)
__________________
Jhob94 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-05-2015 , 04:24   Re: Armoury killed?
Reply With Quote #2

It's not killed, it' hidden (EF_NODRAW) once count is 0 (such entity can be configured (with "count" keyvalue or m_iCount offset) to give n weapon before it disappears).
To reset entity state, you can call Ham_Restart (or whatever it's named).
__________________

Last edited by Arkshine; 02-05-2015 at 04:27.
Arkshine is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-05-2015 , 04:29   Re: Armoury killed?
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
It's not killed, it' hidden (EF_NODRAW) once count is 0 (such entity can be configured (with "count" keyvalue or m_iCount offset) to give n weapon before it disappears).
To reset entity state, you can call Ham_Restart (or whatever it's named).
Yes, but for detect that weapon got hidden, should i register touch or there is some other (better) way?
__________________
Jhob94 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-05-2015 , 04:51   Re: Armoury killed?
Reply With Quote #4

I'm not sure why you want to check that, you can just call Restart each x seconds. If for some reason you still want to do unnecessary check, you can check m_iCount offset if sets to 0 or cheching if EF_NODRAW is set. But I would just call Restart all the way.
__________________
Arkshine is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-05-2015 , 05:03   Re: Armoury killed?
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
I'm not sure why you want to check that, you can just call Restart each x seconds. If for some reason you still want to do unnecessary check, you can check m_iCount offset if sets to 0 or cheching if EF_NODRAW is set. But I would just call Restart all the way.
Roger. Thought that restart may cause problems if the entity was already visible. Ty
__________________
Jhob94 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode