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

Clan vs All


Post New Thread Reply   
 
Thread Tools Display Modes
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 08-21-2005 , 22:15  
Reply With Quote #21

maybe i shuld PM v3x or chronic...
__________________
bmann_420 is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 08-21-2005 , 22:53  
Reply With Quote #22

Sounds good, we need an expert, lol.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 08-21-2005 , 22:54  
Reply With Quote #23

and wehre did nightscream go? bloody hell
__________________
bmann_420 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-21-2005 , 23:01  
Reply With Quote #24

Sigh, you don't need a pro. Untested but should work:

Code:
#include <amxmodx> #include <cstrike> #define PLUGINNAME    "Clan VS" #define VERSION        "1.0" #define AUTHOR        "Nightscream" public plugin_init()     {     register_plugin( "Clan VS", "1.0", "Nightscream" )     register_concmd( "amx_clanvs", "clanvs", ADMIN_KICK, "<Tag> <CT|T>" ) } public clanvs(id)     {     new arg[32], name[32]     read_argv( 2, arg, 31 )     new arg2[32]     read_argv( 3, arg2, 31 )     new players[32],pnum     get_players(players,pnum)     for(new i = 0; i <= pnum; i++) {         get_user_name(players[i], name, 31 )         if( containi( name, arg )!=-1 )         {             if ( equal ( arg2, "CT" ) )                 {                 cs_set_user_team( players[i], CS_TEAM_CT )             }             if (equal ( arg2, "T" ) )                 {                 cs_set_user_team( players[i], CS_TEAM_T )             }             }else{             if( equal ( arg2, "CT" ) )                 {                 cs_set_user_team( players[i], CS_TEAM_T )             }             if( equal ( arg2, "T" ) )                 {                 cs_set_user_team( players[i], CS_TEAM_CT )             }         }     } return PLUGIN_HANDLED }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 08-21-2005 , 23:03  
Reply With Quote #25

Ah, okay thanks, I'll test this out,s ee if it works.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-21-2005 , 23:04  
Reply With Quote #26

I edited it. Nightscream, you have very bad code, no offense. A lot of very easy to see errors in it. I almost re-wrote your code because it probably would have been easier.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 08-21-2005 , 23:14  
Reply With Quote #27

NO go hawk, in consol; amx_clanvs = nothing. doesnt say the option to say clantag CT|T at all. just nothing.
__________________
bmann_420 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-21-2005 , 23:20  
Reply With Quote #28

Debug time!!!

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGINNAME    "Clan VS" #define VERSION        "1.0" #define AUTHOR        "Nightscream" public plugin_init()     {     register_plugin( "Clan VS", "1.0", "Nightscream" )     register_concmd( "amx_clanvs", "clanvs", ADMIN_KICK, "<Tag> <CT|T>" )     register_cvar("clanvs_debug","0") } public clanvs(id,level,cid)     {     if(get_cvar_num("clanvs_debug")==1)     {         client_print(id,print_chat,"[DEBUG] You entered the command")     }     if(!cmd_access(id,level,cid,3))     {         return PLUGIN_HANDLED     }     if(get_cvar_num("clanvs_debug")==1)     {         client_print(id,print_chat,"[DEBUG] The command passed args")     }     new arg[32], name[32]     read_argv( 2, arg, 31 )     new arg2[32]     read_argv( 3, arg2, 31 )     new players[32],pnum     get_players(players,pnum)     for(new i = 0; i <= pnum; i++) {         if(get_cvar_num("clanvs_debug")==1)         {             client_print(id,print_chat,"[DEBUG] The command is being processed to check players")         }         get_user_name(players[i], name, 31 )         if( containi( name, arg )!=-1 )         {             if(get_cvar_num("clanvs_debug")==1)             {                 client_print(id,print_chat,"[DEBUG] A player as been detected with the clan tag")             }             if ( equal ( arg2, "CT" ) )                 {                 cs_set_user_team( players[i], CS_TEAM_CT )             }             if (equal ( arg2, "T" ) )                 {                 cs_set_user_team( players[i], CS_TEAM_T )             }             }else{             if( equal ( arg2, "CT" ) )             {                 cs_set_user_team( players[i], CS_TEAM_T )             }             if( equal ( arg2, "T" ) )             {                 cs_set_user_team( players[i], CS_TEAM_CT )             }         }         if(get_cvar_num("clanvs_debug")==1)         {             client_print(id,print_chat,"[DEBUG] Player checking finished")         }     }     return PLUGIN_HANDLED }

Tell me where it stops.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 08-21-2005 , 23:35  
Reply With Quote #29

Testing now.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 08-21-2005 , 23:58  
Reply With Quote #30

Okay, here's what I got when I entered "amx_clanvs |[email protected]|| CT"

Code:
[DEBUG] You entered the command [DEBUG] The command passed args [DEBUG] The command is being processed to check players [DEBUG] A player as been detected with the clan tag [DEBUG] Player checking finished [DEBUG] The command is being processed to check players [DEBUG] A player as been detected with the clan tag [DEBUG] Player checking finished
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
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 14:03.


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