Raised This Month: $ Target: $400
 0% 

Auto join spect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Netsys
Senior Member
Join Date: Feb 2010
Old 06-26-2012 , 13:54   Re: Auto join spect
Reply With Quote #3

Quote:
Originally Posted by hornet View Post
Code:
#include <amxmodx> #include <cstrike> #define VGUI_SELECT_TEAM        2 public plugin_init() {     register_plugin( "Force Join Spec", "0.0.1", "hornet" );         register_message( get_user_msgid("ShowMenu"), "Message_ShowMenu" );     register_message( get_user_msgid("VGUIMenu"), "Message_VGUIMenu" ); } public client_disconnect( id ) {     remove_task( id ); } public Message_ShowMenu( iMsg, iDest, id ) {     if( cs_get_user_team( id ) != CS_TEAM_UNASSIGNED )         return PLUGIN_CONTINUE;         static MESSAGE[] = "#Team_Select", szMsg[ charsmax( MESSAGE ) ];     get_msg_arg_string( 4, szMsg, charsmax( szMsg ) );     if( equal( szMsg, MESSAGE ) )     {         set_task( 0.1, "task_JoinTeam", id );         return PLUGIN_HANDLED;     }         return PLUGIN_CONTINUE; } public Message_VGUIMenu( iMsg, iDest, id ) {       if( get_msg_arg_int( 1 ) != VGUI_SELECT_TEAM || cs_get_user_team( id ) != CS_TEAM_UNASSIGNED )         return PLUGIN_CONTINUE;             set_task( 0.1, "task_JoinTeam", id );         return PLUGIN_HANDLED; } public task_JoinTeam( id ) {     cs_set_user_team( id, CS_TEAM_SPECTATOR ); }
This plugin does not work, appears as spect, but this as unasigned. The player can not see other players.

Last edited by Netsys; 06-26-2012 at 14:06.
Netsys 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 06:10.


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