Raised This Month: $51 Target: $400
 12% 

Join spectator without suicide first.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
suhdude
Senior Member
Join Date: Mar 2016
Location: Sweden
Old 11-14-2017 , 16:01   Join spectator without suicide first.
Reply With Quote #1

I think topic says it all, I would players to be able to go to spectator without having to type kill in console first.

Thanks!
suhdude is offline
Old 11-14-2017, 16:43
Relaxing
This message has been deleted by Relaxing. Reason: user_silentkill()
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-17-2017 , 11:37   Re: Join spectator without suicide first.
Reply With Quote #2

type /spec


Untested but this should do the trick.
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say /spec", "JoinSpec") } public JoinSpec(id) {     cs_set_user_team(id, CS_TEAM_SPECTATOR)         if(is_user_alive(id)) {         user_silentkill(id)     } }
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-17-2017 , 12:21   Re: Join spectator without suicide first.
Reply With Quote #3

https://github.com/OciXCrom/GoSpec
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
suhdude
Senior Member
Join Date: Mar 2016
Location: Sweden
Old 11-17-2017 , 12:22   Re: Join spectator without suicide first.
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post

Quote:
Originally Posted by Napoleon_be View Post
type /spec


Untested but this should do the trick.
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say /spec", "JoinSpec") } public JoinSpec(id) {     cs_set_user_team(id, CS_TEAM_SPECTATOR)         if(is_user_alive(id)) {         user_silentkill(id)     } }
Thank you guys.
Is it possible to add this to the team menu?
When I am alive and press "m" I can't pick spectator.
I first have to type kill or be dead.

Maybe a menu item can be added to the menu somehow?
Thanks

Last edited by suhdude; 11-17-2017 at 12:24.
suhdude is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-17-2017 , 12:34   Re: Join spectator without suicide first.
Reply With Quote #5

You can't edit the VGUI teammenu.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 11-18-2017 , 14:52   Re: Join spectator without suicide first.
Reply With Quote #6

however you can display the menu by pressing m. if that suits you.
PHP Code:
public plugin_init() {
     
register_clcmd("chooseteam""function")
}
public function(
id) {
    
menu(id)
    return 
PLUGIN_HANDLED

idk if this is the right way to do it, but i only use it for testing purposes, so that i don`t have to type same thing in chat countless times.
__________________
retired chump
DjSoftero 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 07:01.


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