Raised This Month: $ Target: $400
 0% 

[Req] Disconnect Team Ct/T


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aaalll
Junior Member
Join Date: Jan 2010
Location: Romania
Old 02-11-2010 , 07:42   [Req] Disconnect Team Ct/T
Reply With Quote #1

I need a simple plugin for my war/ladder server which disconnects all players on t/ct side with a simple command like amx_disconnect t & amx_disconnect ct.
P.S should not disconnect users with immunity.
aaalll is offline
Stu-E
Senior Member
Join Date: Nov 2009
Location: Antalya/Turkey
Old 02-11-2010 , 07:54   Re: [Req] Disconnect Team Ct/T
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Disconnect T&CT"
#define VERSION "1.0"
#define AUTHOR "Stu-E"
new g_iMaxPlayers;  
public 
plugin_init(){
     
register_plugin("PLUGIN","VERSION","AUTHOR")
     
register_concmd("amx_disconnectt","cmddist")
     
register_concmd("amx_disconnectct","cmddisct")
     
register_concmd("amx_dist","cmddist")
     
register_concmd("amx_disct","cmddisct")
     
g_iMaxPlayers get_maxplayers( );  
}
public 
cmddist(id){
    if(!(
get_user_flags(id)&ADMIN_BAN))
    return 
PLUGIN_CONTINUE;
    for( new 
1<= g_iMaxPlayersi++ ) 
    {
    if( 
is_user_connected) && !is_user_bot) && cs_get_user_team) == CS_TEAM_CT )
    
client_cmd(id,"disconnect")
    
client_print(0,print_chat,"CT Team has been Disconnected")
}
    return 
PLUGIN_HANDLED
}
public 
cmddisct(id){
    if(!(
get_user_flags(id)&ADMIN_BAN))
    return 
PLUGIN_CONTINUE;
    for( new 
1<= g_iMaxPlayersi++ ) 
    {
    if( 
is_user_connected) && !is_user_bot) && cs_get_user_team) == CS_TEAM_T )
    
client_cmd(id,"disconnect")
    
client_print(0,print_chat,"T Team has been Disconnected")
}
    return 
PLUGIN_HANDLED

not tested,but try ..
__________________
[email protected]
Match-Bot
+ KaRMa

Türksen katıl gruba "Türk" ;)

Last edited by Stu-E; 02-11-2010 at 08:15. Reason: delete sth
Stu-E is offline
Send a message via MSN to Stu-E Send a message via Skype™ to Stu-E
aaalll
Junior Member
Join Date: Jan 2010
Location: Romania
Old 02-11-2010 , 08:01   Re: [Req] Disconnect Team Ct/T
Reply With Quote #3

Some errors when i compile it

Code:
/groups/amxmodx/tmp3/textspr06h.sma(18) : warning 209: function "cmddist" should return a value
/groups/amxmodx/tmp3/textspr06h.sma(18) : error 010: invalid function or declaration
/groups/amxmodx/tmp3/textspr06h.sma(20) : error 010: invalid function or declaration
/groups/amxmodx/tmp3/textspr06h.sma(23) : error 010: invalid function or declaration
/groups/amxmodx/tmp3/textspr06h.sma(30) : error 017: undefined symbol "cs_get_user_team"
/groups/amxmodx/tmp3/textspr06h.sma(34) : error 001: expected token: "}", but found "-end of file-"

5 Errors.
aaalll is offline
Stu-E
Senior Member
Join Date: Nov 2009
Location: Antalya/Turkey
Old 02-11-2010 , 08:03   Re: [Req] Disconnect Team Ct/T
Reply With Quote #4

sorry,my mistake, try now ?
__________________
[email protected]
Match-Bot
+ KaRMa

Türksen katıl gruba "Türk" ;)
Stu-E is offline
Send a message via MSN to Stu-E Send a message via Skype™ to Stu-E
aaalll
Junior Member
Join Date: Jan 2010
Location: Romania
Old 02-11-2010 , 08:10   Re: [Req] Disconnect Team Ct/T
Reply With Quote #5

Code:
/groups/amxmodx/tmp3/textVYDDJa.sma(19) : warning 209: function "cmddist" should return a value
/groups/amxmodx/tmp3/textVYDDJa.sma(19) : error 010: invalid function or declaration
/groups/amxmodx/tmp3/textVYDDJa.sma(21) : error 010: invalid function or declaration
/groups/amxmodx/tmp3/textVYDDJa.sma(25) : error 010: invalid function or declaration
aaalll is offline
Stu-E
Senior Member
Join Date: Nov 2009
Location: Antalya/Turkey
Old 02-11-2010 , 08:17   Re: [Req] Disconnect Team Ct/T
Reply With Quote #6

I've fixed the code, but you can also use this..
Attached Files
File Type: sma Get Plugin or Get Source (Disconnect_T_CT.sma - 758 views - 1.4 KB)
__________________
[email protected]
Match-Bot
+ KaRMa

Türksen katıl gruba "Türk" ;)
Stu-E is offline
Send a message via MSN to Stu-E Send a message via Skype™ to Stu-E
aaalll
Junior Member
Join Date: Jan 2010
Location: Romania
Old 02-11-2010 , 08:30   Re: [Req] Disconnect Team Ct/T
Reply With Quote #7

Thanks, but when exec command to disconnect ct it disconnects both teams, i want just one, team that i specify amx_disconnect t just for terrorists and amx_disconnect ct just for ct's. Even, ignores players with immunity and disconnects them too (Acces flag "a")
aaalll is offline
Stu-E
Senior Member
Join Date: Nov 2009
Location: Antalya/Turkey
Old 02-11-2010 , 08:37   Re: [Req] Disconnect Team Ct/T
Reply With Quote #8

amx_disconnectt is the same as amx_disconnect t why don't you use this?
__________________
[email protected]
Match-Bot
+ KaRMa

Türksen katıl gruba "Türk" ;)
Stu-E is offline
Send a message via MSN to Stu-E Send a message via Skype™ to Stu-E
aaalll
Junior Member
Join Date: Jan 2010
Location: Romania
Old 02-11-2010 , 08:49   Re: [Req] Disconnect Team Ct/T
Reply With Quote #9

not the command is the problem.
amx_disconnectt - will disconnect both teams terrorists and ct's
I want it only to disconnect team specifyed team ct - just ct, t for terrorists.
And should not disconnect players with "a" flag (immunity).
aaalll is offline
Old 02-11-2010, 08:53
Stu-E
This message has been deleted by Stu-E.
Old 02-11-2010, 08:56
Stu-E
This message has been deleted by Stu-E. Reason: sorry.
Stu-E
Senior Member
Join Date: Nov 2009
Location: Antalya/Turkey
Old 02-11-2010 , 09:01   Re: [Req] Disconnect Team Ct/T
Reply With Quote #10

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Disconnect T&CT"
#define VERSION "1.0"
#define AUTHOR "Stu-E"
new g_iMaxPlayers;  
public 
plugin_init(){
     
register_plugin("PLUGIN","VERSION","AUTHOR")
     
register_concmd("amx_disconnectt","cmddist")
     
register_concmd("amx_disconnectct","cmddisct")
     
register_concmd("amx_dist","cmddist")
     
register_concmd("amx_disct","cmddisct")
     
g_iMaxPlayers get_maxplayers( );  
}
public 
cmddist(id){
    if(!(
get_user_flags(id)&ADMIN_BAN))
    return 
PLUGIN_CONTINUE;
    for( new 
1<= g_iMaxPlayersi++ ) 
    {
    if( 
is_user_connected) && !is_user_bot) && !(get_user_flags(i)&ADMIN_IMMUNITY) && cs_get_user_team) == CS_TEAM_CT )
    
client_cmd,"disconnect")
    
client_print(0,print_chat,"CT Team has been Disconnected")
}
    return 
PLUGIN_HANDLED
}
public 
cmddisct(id){
    if(!(
get_user_flags(id)&ADMIN_BAN))
    return 
PLUGIN_CONTINUE;
    for( new 
1<= g_iMaxPlayersi++ ) 
    {
    if( 
is_user_connected) && !is_user_bot) && !(get_user_flags(i)&ADMIN_IMMUNITY)  && cs_get_user_team) == CS_TEAM_T )
    
client_cmd,"disconnect")
    
client_print(0,print_chat,"T Team has been Disconnected")
}
    return 
PLUGIN_HANDLED

lol,try now Hehehe
__________________
[email protected]
Match-Bot
+ KaRMa

Türksen katıl gruba "Türk" ;)
Stu-E is offline
Send a message via MSN to Stu-E Send a message via Skype™ to Stu-E
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 18:25.


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