Server says im flooding and join teams doesn't work lol, im new to pawn/small amxmodx my logic here is prob wrong is there anyone that can help me out thank you
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Basics"
#define VERSION "1.0"
#define AUTHOR "Hihiyoyo"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say", "rules")
register_clcmd("jointeam", "block_jointeam")
}
public rules(id) {
new command[6]
new message[200]
read_argv(1, message, 201)
client_cmd(id, "say message")
read_argv(2, command, 6)
if (equali(command, "/rules", 6)) {
new name[31]
get_user_name(id, name, 30)
client_print(id, print_chat, "name The rules are..")
}
return PLUGIN_HANDLED
}
public block_jointeam(id) {
if (cs_get_user_team(id) != CS_TEAM_SPECTATOR)
return PLUGIN_HANDLED
else {
new team[1]
read_argv(1, team, 1)
if (team[0] == 1)
client_cmd(id, "jointeam 1")
else if (team[0] == 2)
client_cmd(id, "jointeam 2")
else
client_cmd(id, "jointeam 3")
}
return PLUGIN_HANDLED
}