Right now im working on a simple say /me plugin for my server, everything is working except for it tekking the user what team hes on. Heres my code:
Code:
//////////////////////
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
//////////////////////
#define TEAM_T 1
#define TEAM_CT 2
//////////////////////
public plugin_init()
{
register_plugin("Server Info","0.1","Knekter")
register_clcmd("say /me","info",0,": tells the player his info")
}
//////////////////////
public info(id)
{
new hp = get_user_health(id)
new armor = get_user_armor(id)
new money = cs_get_user_money(id)
new kills = get_user_frags(id)
new deaths = cs_get_user_deaths(id)
new team = cs_get_user_team(id)
if(team == 1)
{
team = num_to_word(team,"T",1)
}
else
{
team = num_to_word(team,"CT",2)
}
client_print(id,print_chat,"[AMXX] HP: %i | Armor: %i | Money: %i | Kills: %i | Deaths: %i | Team: %s",hp,armor,money,kills,deaths,team)
return PLUGIN_HANDLED
}
__________________