Raised This Month: $32 Target: $400
 8% 

[HELP] Sentry Gun (Buy Option along with building sentry with keypress R)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AdamK
Member
Join Date: Jul 2016
Location: Washington, D.C.
Old 07-24-2016 , 18:03   [HELP] Sentry Gun (Buy Option along with building sentry with keypress R)
Reply With Quote #1

Hi everyone!!

I need a help with Sentry Gun.

First, i would like to inform that we have the following 2 Commands for the Sentry,

client command: sentry_menu
- Build/detonate/upgrade sentry guns with this one-for-all menu. You can also spy through your sentries using this menu.

client command: sentry_build
- Quickie to build a sentry without going through menu. Since version 0.2 you can now also point at a sentry and upgrade it with this command, if the sentry is close enough.


I would like to request, if someone can implement the following 4 Features?


1.) To plant a sentry long press R (reload):
What i mean is, if we could bind sentry_build command to the reload button, then the user could build the sentry using Reload button (i.e. R). Long pressing R should build the Sentry.
(NOT the local binding i.e. "bind r sentry_build")


2.) A buy command for purchasing Sentry from the base:
For e.g.
register_clcmd("say /buysentry", "BuySentry") // Whatever the format would be...
AND / OR
register_concmd("buysentry", "BuySentry") // Whatever the format would be...
Then, the user should also get a message printed on screen stating, "You have successfully bought a Sentry, long press R to build it anywhere."


3.) Destroy our own Sentry:
The user can destroy his own Sentry using a say command /destroysentry
register_clcmd("say /destroysentry", "sentry_detonate") // Whatever the format would be...
AND / OR
register_concmd("destroysentry", "sentry_detonate") // Whatever the format would be...


4.) Sentry Guns should not be destroyed if the Player died:
The sentry guns are automatically destroyed when the player who build it has died, this shouldn't happen. The sentry gun should be destroyed only if the player changes the Team (from CT to T or vice-versa).
If a player died, then his sentry should stay there only.
However, when that player respawn, if he tries to build a sentry again, then he should get the default message "You have already build a Sentry".
(If the Number of Allowed Sentry Build exceeds, it's 1 in my case)

Then, the player can execute the say command /destroysentry to Destroy his sentry & create a new one.


Link for Plugin:
Code:
https://forums.alliedmods.net/showthread.php?t=78632

Any good programmers can help me out.

Thank you.
Attached Files
File Type: sma Get Plugin or Get Source (gmsentryguns.sma - 463 views - 99.6 KB)

Last edited by AdamK; 07-27-2016 at 07:13.
AdamK is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-03-2016 , 10:27   Re: [HELP] Sentry Gun (Buy Option along with building sentry with keypress R)
Reply With Quote #2

Added option 1 and 3, allthough i'm not sure if it's going to work.
Attached Files
File Type: sma Get Plugin or Get Source (gmsentryguns.sma - 538 views - 102.0 KB)
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
AdamK
Member
Join Date: Jul 2016
Location: Washington, D.C.
Old 08-03-2016 , 13:57   Re: [HELP] Sentry Gun (Buy Option along with building sentry with keypress R)
Reply With Quote #3

@Napoleon_be:

Feature 3 (Destroy our own Sentry) working perfect.
Thank you.


Feature 1 is not working.
AdamK is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-04-2016 , 04:28   Re: [HELP] Sentry Gun (Buy Option along with building sentry with keypress R)
Reply With Quote #4

I'll look further into it when i get home, this'll take some time.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 04:25.


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