So i have been googleing searching on forums for like 3 hours now
and it won't work ..
so what i am doing is a plugin that blocks WTJ (winning team join) usally used in Hide N Seek
so i made so it blocked so that you cant type jointeam 1,2,3,4,5,6 (i have a plugin that makes you join a team directly on join) and i have done so that when you type it a message in chat appears and you get kicked but i want to make a cvar so i can change the reason when kicked. this is the code
Code:
public plugin_init() {
register_plugin("AntiWTJ", "1.1", "Pagey")
register_clcmd("jointeam 1", "jointeam")
register_clcmd("jointeam 2", "jointeam")
register_clcmd("jointeam 5", "jointeam")
register_clcmd("jointeam 6", "jointeam")
register_srvcmd ("awtj_reason" , "Do not WTJ")
}
public jointeam(id)
{
new cReason[32]
new szName[32];
get_user_name(id, szName, charsmax(szName)); //sizeof (szName - 1)
get_cvar_string ( "awtj_reason" , cReason, 31 )
server_cmd("kick %s %s", szName, cReason );
set_hudmessage(49, 172, 8, 0.32, 0.40, 0, 6.0, 12.0)
ColorChat(0, GREY, "^x01**^x04JoinTeam: ^x03 %s Got kicked for trying to WTJ", szName);
}
I cant get it to work.. :/
i am very new to this:p