Raised This Month: $51 Target: $400
 12% 

AntiWTJ


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
pagey
Junior Member
Join Date: Oct 2012
Old 10-27-2012 , 06:07   AntiWTJ
Reply With Quote #1

AntiWTJ

Block team changers!!


what it does:
This is a simple plugin (my first) structure made by Suundz and the rest by me(like cvars, kick , etc)
some people may think why wouldnt they be allowed to change team? yes becues on example Hide N Seek most people think its funnier to be T (hiders) and the hidenseek plugin makes so that they are joining a team automaticly and they cant press up the team menu but they can write jointeam 1 and this plugin blocks that command

Cvars :


awtj_reason "Do not WTJ"

- Lets you change the reason on kick (remember to put all text between two ellipsis "")
- Default : "Do not WTJ"


awtj_message "Tried to wtj (kicked)"

- Changes the message that are being shown in chat when someone tries to WTJ (put all the text between two ellipsis "")
- Default : "Tried to wtj (kicked)"
- Note : The name is always in the beginning like "Name tried to wtj"

awtj_bok "1" / "2"
- awtj_bok stands for ban or kick
- 1 = kick, 2 = ban

awtj_banreason "You have been banned for WTJ"
- The ban reason
- Default "You have been banned for WTJ"

awtj_bantime "30"
- The lenght of a ban
- Default "30"

awtj_messageban ""Player" Has been banned for WTJ"
- Changes the message that appears in chat when someone is getting banned for WTJ
- Default ""Player" Has been banned for WTJ"

Modules :
  • amxmodx
  • colorchat

Works for Amxmodx v1.8.1

Patch notes
Quote:
/*
//Unrealeased 1.0
*Added so that a messages appears in chat when trying to wtj.

//Unreleased 1.1
*Added getting kicked and changed message to ""Player" Got kicked for trying to WTJ"
*Added cvars to change reason on kick.

//unreleased 1.2
*Chaned name from Jointeams to AntiWTJ

//Release 1.3(still in beta)
*Added a new cvar awtj_message that changes the chat message that are benig shown when someone tries
to WTJ.
*Added avavible pcvar's the other doesn't get approved (The ones i use now shoudnt do so much leak
small plugin)


//Release 1.4
*Added ability to change from kick to ban
*ban time
*ban message
*ban reason
*Added "error" message if typed other values on the awtj_bok than 1 or 2 ("Player" Tried to wtj (kicked)(Cvar: wrong serverowner check)
*Fixed efficiency leaks. replaced this
new szName[32];
get_user_name(id, szName, charsmax(szName)); //getting names
with this
get_user_userid( id ),

//Release 1.5
*Memory leaks fixed!
*Added pcvars instead of old ones.
Installation
1.Drag the AntiWTJ.amxx into the plugins folder
2.Drag the AntiWTJ.sma into the scripting folder (If you want to make any changes)

Credit:
claudiuhks - Helped me with the Cvars.
Suundz - Made the Structure (register_clcmd("jo..... etc

I hope i have done right now.
Attached Files
File Type: sma Get Plugin or Get Source (AntiWTJ_1.5.sma - 677 views - 4.2 KB)

Last edited by pagey; 10-27-2012 at 19:00. Reason: Updated plugin
pagey is offline
FanatikSVK
Member
Join Date: Aug 2012
Location: Slovakia
Old 10-27-2012 , 08:16   Re: AntiWTJ
Reply With Quote #2

Nice .. good job
FanatikSVK is offline
Send a message via Skype™ to FanatikSVK
pagey
Junior Member
Join Date: Oct 2012
Old 10-27-2012 , 08:24   Re: AntiWTJ
Reply With Quote #3

Thank you
pagey is offline
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 10-27-2012 , 09:04   Re: AntiWTJ
Reply With Quote #4

Maybe you can make it so when people retry they get banned for 1min "Reason: Do Not Retry". I mean you can just create the funtion so that people can choose if they want the person to be kicked or banned for a short period of time.
jingojang is offline
pagey
Junior Member
Join Date: Oct 2012
Old 10-27-2012 , 09:36   Re: AntiWTJ
Reply With Quote #5

Quote:
Originally Posted by jingojang View Post
Maybe you can make it so when people retry they get banned for 1min "Reason: Do Not Retry". I mean you can just create the funtion so that people can choose if they want the person to be kicked or banned for a short period of time.
Yea smart idea i think i am going to start doing it now! shall i make so that you can change how long you shoud be banned?
do they allow this? get_cvar_string i saw something about use pcvar's but i cant get them to work:/

Last edited by pagey; 10-27-2012 at 10:36.
pagey is offline
Magnificent
BANNED
Join Date: Oct 2012
Old 10-27-2012 , 10:25   Re: AntiWTJ
Reply With Quote #6

Poorly code,

and if a guy from winning team joins the loosing team, he get punished to

Last edited by Magnificent; 10-27-2012 at 10:26.
Magnificent is offline
pagey
Junior Member
Join Date: Oct 2012
Old 10-27-2012 , 10:34   Re: AntiWTJ
Reply With Quote #7

Quote:
Originally Posted by Magnificent View Post
Poorly code,

and if a guy from winning team joins the loosing team, he get punished to
Ye i know not so good (first time)
And yes they are not suppose to be able to join the other team (its not realy "winning team or loosing team) its more Like hiders and seekers its funnnier to be hider than seeker (most people think so)
they are suppose to be in that team they are being assigned to

btw i added some new stuffs into it

Last edited by pagey; 10-27-2012 at 10:35.
pagey is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-27-2012 , 10:55   Re: AntiWTJ
Reply With Quote #8

Use cvar pointers is a must.
You have to consider supporting old style menus.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
pagey
Junior Member
Join Date: Oct 2012
Old 10-27-2012 , 11:02   Re: AntiWTJ
Reply With Quote #9

Quote:
Originally Posted by ConnorMcLeod View Post
Use cvar pointers is a must.
You have to consider supporting old style menus.
yea i know but i putted them in the code

Code:
	//get_pcvar_string( "awtj_reason", Reason, 511 ); 
	//get_pcvar_string( "awtj_message", Message, 511 );
	//get_pcvar_string( "awtj_banReason", banReason, 511 ); 
	//get_pcvar_string( "awtj_banTime", banTime, 511 );
but theese wont work :/ i just get error could you help?

Last edited by pagey; 10-27-2012 at 11:03.
pagey is offline
Magnificent
BANNED
Join Date: Oct 2012
Old 10-27-2012 , 17:09   Re: AntiWTJ
Reply With Quote #10

register_cvar returns a number that you gotta save global,
and with that number you gotta get the pcvar_string

Example:
PHP Code:
new cvarReason

public plugin_ini()
{
     
cvarReason register_cvar(...)
}

new 
strReason[101]
get_pcvar_string(cvarReasonstrReason100

Last edited by Magnificent; 10-27-2012 at 17:09.
Magnificent is offline
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 02:39.


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