Raised This Month: $ Target: $400
 0% 

Ban from ct team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 03-09-2010 , 08:01   Ban from ct team
Reply With Quote #1

Could some one make a plugin that ban player from joining ct team?
__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
Old 03-09-2010, 11:11
fR4gn0tiX!
This message has been deleted by fR4gn0tiX!. Reason: lag
Old 03-09-2010, 11:14
fR4gn0tiX!
This message has been deleted by fR4gn0tiX!. Reason: lag
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 03-12-2010 , 02:00   Re: Ban from ct team
Reply With Quote #2

well it shouldn't be hard...
if(cs_get_user_team == CS_TEAM_CT) {
new szName[33]
get_user_name(id, szName, 32)
server_cmd("amx_ban %s", szName)
client_print(id, print_chat, "Player %s was banned for joining the CT Team", szName)
}
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 03-12-2010 , 07:52   Re: Ban from ct team
Reply With Quote #3

But where should that go, when player change team?
And how I register team change.
__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 03-12-2010 , 08:22   Re: Ban from ct team
Reply With Quote #4

I think you should do it somethin' like this:
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>

#define PLUGIN "CT BAN"
#define VERSION "1.0"
#define AUTHOR "benamo6"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
}

public client_PreThink(id) {
	new szName[33]
	new szTeam[20]
	szTeam = cs_get_user_team
	get_user_name(id, szName, 32)
	if( szTeam == CS_TEAM_CT ) {
		server_cmd("amx_ban %s", szName)
	}
	return PLUGIN HANDLED
}
I don;t know how much it would work and if it is good, but it's how I think it should be
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 03-12-2010 , 08:44   Re: Ban from ct team
Reply With Quote #5

That would ban every person that goes in ct. I need ban like amx_ban
__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 03-12-2010 , 08:55   Re: Ban from ct team
Reply With Quote #6

PHP Code:
#include <amxmodx>

public plugin_init()
{
      
register_plugin("Ban for joining CT Team""0.0.1""benamo6");
      
      
register_event("TextMsg""eJoiningCT""b""2=#Cstrike_TitlesTXT_Game_join_ct");
}

public 
eJoiningCT(id)
{
      new 
szIP[17];
      
      
get_user_ip(idszIP161);
      
      
server_cmd("amx_addban %s /* %d (time in minutes), %s (reason) */"szIP /*, iTime, szReason */);

Hope that will solve the problem
__________________

Last edited by unnyquee; 03-12-2010 at 09:02.
unnyquee is offline
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 03-12-2010 , 09:15   Re: Ban from ct team
Reply With Quote #7

Please read well, I dont want to ban people that join ct. Only use a command like amx_ban to ban people from joining CT not everyone.
__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 03-12-2010 , 09:19   Re: Ban from ct team
Reply With Quote #8

I lawl'd.
You could use:

PHP Code:
amx_ban <nickname> <time in minutes> <reason
And replace reason with something like:
PHP Code:
"You can't join the CT Team. Sorry!" 
__________________
unnyquee is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 03-12-2010 , 09:22   Re: Ban from ct team
Reply With Quote #9

You mean like amx_ctban Player and Player can't join CT TEAM?
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
fR4gn0tiX!
Senior Member
Join Date: Nov 2009
Location: Georgia, Tbilisi
Old 03-12-2010 , 09:32   Re: Ban from ct team
Reply With Quote #10

He wants to restrict someone from joining CT Team.

Like: amx_restrictct < name | #userid > - and that player's Steam ID is saved somewhere.

Then, when someone tries to join CT team, plugin will check he's steam id and if it's equal to banned one (that we saved somewhere) he will recieve message: You can't join CT team!
__________________
fR4gn0tiX! is offline
Send a message via Skype™ to fR4gn0tiX!
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 17:11.


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