Quote:
Originally Posted by LearninG
Auto join also blocked :
Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd("jointeam", "join_team")
}
public join_team(id)
{
new arg[2]
read_argv(1, arg, charsmax(arg))
if ( str_to_num(arg)-1 == 0 || str_to_num(arg)-1 == 4)
{
engclient_cmd(id,"chooseteam")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
|
Why hard coding stuff ?
Instead of
str_to_num(arg)-1 == 0
Simply str_to_num(arg) == 1
And also this won't block joining team fully.
OP : plugins such like are already exists don't be lazy to search for them.
__________________