Raised This Month: $ Target: $400
 0% 

Library - Sentry Gun


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 10-25-2011 , 07:33   Re: Library - Sentry Gun
Reply With Quote #2

Assuming that you know how to edit the plugin yourself:
  1. Instead of registering the Ham_Think forward in plugin_init(), register it when the cannon is created (nativeCreateCannon), and unregister it when destroyed (line 308).
  2. This will be fixed by just adding a small alive check in the CmdStart forward (above line 145).
  3. When the cannon is destroyed (line 308); set entity owner to 0. (and if you did #1, unregister the think forward as well).
  4. It's not supposed to be deleted on round end (at least not from what I can see in the code). This can be added by hooking round end and using find_ent_by_class() and remove_entity().

Note:
The spawn function is hooked by the usage of ResetHud, note that this is not the correct way to see if a player has spawned. Use Ham_Spawn with "player" classname.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!

Last edited by Xellath; 10-25-2011 at 10:40. Reason: #1 is incorrect
Xellath is offline
 



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 14:23.


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