Raised This Month: $ Target: $400
 0% 

Block team change


Post New Thread Reply   
 
Thread Tools Display Modes
CAMEL
BANNED
Join Date: Dec 2007
Location: ANEAXSLAND
Old 12-17-2007 , 15:33   Re: Block team change
Reply With Quote #11

Doing the corrections =).

EDIT: Yep, I upload an new version. Thanks for the corrections.

Last edited by CAMEL; 12-17-2007 at 15:56.
CAMEL is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-17-2007 , 15:57   Re: Block team change
Reply With Quote #12

Also, allow players to in a team with lower player numbre would be a great feature.

I don't know if my explaination is good so i give you an exemple :

I'm CT.
CT team = 5 players
T team = 3 players

Allow me to join T team so it will be 4vs4.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
CAMEL
BANNED
Join Date: Dec 2007
Location: ANEAXSLAND
Old 12-17-2007 , 16:29   Re: Block team change
Reply With Quote #13

Huummm.. thats a bit complicate.. :$.. i am a newbie in this.. I can try.. And i have to add that if u are a spect u can change of team.. Let me some time and i gonna do it.

EDIT: I was thinking and the autoteambalance doit for u... I mean, this plugin is to help the autoteambalance to work better.

Last edited by CAMEL; 12-17-2007 at 17:18.
CAMEL is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 12-17-2007 , 17:29   Re: Block team change
Reply With Quote #14

Quote:
Originally Posted by connorr View Post
Also, allow players to in a team with lower player numbre would be a great feature.

I don't know if my explaination is good so i give you an exemple :

I'm CT.
CT team = 5 players
T team = 3 players

Allow me to join T team so it will be 4vs4.
So in other words lock teams unless there are imbalances (adding a cvar for this option would be good).
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
CAMEL
BANNED
Join Date: Dec 2007
Location: ANEAXSLAND
Old 12-17-2007 , 20:25   Re: Block team change
Reply With Quote #15

Well, with a cvar (j).. I can try =)... Let me take a little time

EDIT: The point is that what u r saying is that i have to make an autoteambalance.. =S.. That's not have any sense to me .

Last edited by CAMEL; 12-17-2007 at 23:47.
CAMEL is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 12-26-2007 , 10:51   Re: Block team change
Reply With Quote #16

The indention is still terrible, something like this would do:

Code:
#include <amxmodx> #include <cstrike> #define PLUGIN "Block Team Change" #define VERSION "2.0" #define AUTHOR "CAMEL" new blockit public plugin_init() {         register_plugin(PLUGIN, VERSION, AUTHOR)     blockit = register_cvar("amx_blockteams","0")     register_clcmd("chooseteam", "cmdChooseTeam")     register_concmd("amx_blockteams","cmdfblockit",ADMIN_KICK,"<on/off 0/1> omit to toggle") } public cmdChooseTeam(id) {         if(!get_pcvar_num(blockit)) // Cvar detect         return PLUGIN_CONTINUE             if(get_user_flags(id) & ADMIN_KICK) // If is admin can change of team         return PLUGIN_HANDLED;             if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) // Detects spect         return PLUGIN_HANDLED;         client_print(id, print_chat, "[AMX] You don't have the aproppiate access to choose team.");         return PLUGIN_HANDLED; }

There is no function called "cmdfblockit" in the code, so the concmd won't work.

Last edited by Jon; 12-26-2007 at 10:55.
Jon is offline
CAMEL
BANNED
Join Date: Dec 2007
Location: ANEAXSLAND
Old 01-02-2008 , 20:13   Re: Block team change
Reply With Quote #17

I don't need to use cmdblockit cause i am changing the cmdChooseTeam .. So the function is blocked =).
CAMEL is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 01-02-2008 , 20:48   Re: Block team change
Reply With Quote #18

PHP Code:
new blockit

    
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
blockit register_cvar("amx_blockteams","1")
    
register_clcmd("chooseteam""cmdChooseTeam")

}
    public 
cmdChooseTeam(id)
{
    if(!
get_pcvar_num(blockit) ||
    
get_user_flags(id) & ADMIN_KICK ||
    
cs_get_user_team(id) == CS_TEAM_SPECTATOR)
    return 
PLUGIN_CONTINUE
   
    client_print
(idprint_chat"[AMXX] You don't have the aproppiate access to choose a team.");
    return 
PLUGIN_HANDLED;

__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."

Last edited by soccdoodcss; 01-03-2008 at 01:24.
soccdoodcss is offline
Send a message via AIM to soccdoodcss
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 01-03-2008 , 00:19   Re: Block team change
Reply With Quote #19

Minor spelling:
PHP Code:
client_print(idprint_chat"[AMX] You don't have the aproppiate access to choose a team."); 
PHP Code:
client_print(idprint_chat"[AMXX] You don't have the appropriate access to choose a team."); 
__________________
M249-M4A1 is offline
wartroyan
Junior Member
Join Date: Sep 2006
Location: Capital Federal, Argenti
Old 01-06-2008 , 08:45   Re: Block team change
Reply With Quote #20

Hello, my question is...
If I'm CT and I want to change to the TT team, I can doit, then this plugin doesn't work perfectly...
Try to analize the id team, CT, TT or SPEC, not only SPEC
Bye...
Sorry if my english is bad... I'm from Argentina
wartroyan is offline
Send a message via MSN to wartroyan
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 20:36.


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