Hello !
Yesterday I was working on a pretty simple plugin that puts tags in front of all players name (I thought it was simple, until it didn't work xD). I don't want to talk to much jibber-jabba
here's the code:
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
#define tag_terror "[T]"
#define tag_ct "[CT]"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_connect(id)
{
new CsTeams:team = cs_get_user_team(id);
new name[32];
get_user_name(id,name,31);
switch(team)
{
case CS_TEAM_T:
{
client_cmd(id,"name ^"%s %s^"",tag_terror,name);
}
case CS_TEAM_CT:
{
client_cmd(id,"name ^"%s %s^"",tag_ct,name);
}
}
}
public client_infochanged(id)
{
new newname[32],oldname[32]
get_user_info(id, "name", newname,31)
get_user_name(id,oldname,31)
client_cmd(id,"name %s",oldname);
}
Thanks for reading and for help !