Here is my code, I already lost in here.
I hope someone can complete my code.
1.I want player can use say /tag XXX to change his tag.
2.If a player tag length is more then the define, show him a message.
3.If a player who had tag before and he use /tag again, then replace the the tag in the file.
4.Player tag will save into a file by name.
Thanks all!
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Basic Chat Format"
#define VERSION "1.0"
#define AUTHOR "WS.Chu:)"
#define SzTag "[None]"
#define SzTagLnegth 6
new SzPlayers[33][32]
new SzNum[33]
new SzLevels[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say", "hook_say")
}
public hook_say(id)
{
new chat[192]
read_args(chat, 191)
remove_quotes(chat)
new name[64], message[256]
get_user_name(id, name, 63)
new CsTeams:userteam =cs_get_user_team(id)
if(equal(chat, ""))
return PLUGIN_HANDLED_MAIN
if(get_user_flags(id) & ADMIN_LEVEL_A)
{
SzLevels = "[ADMIN_A]"
}
else
if(get_user_flags(id) & ADMIN_LEVEL_B)
{
SzLevels = "[ADMIN_B]"
}
else
if(get_user_flags(id) & ADMIN_LEVEL_C)
{
SzLevels = "[ADMIN_C]"
}
else
if(get_user_flags(id) & ADMIN_LEVEL_D)
{
SzLevels = "[VIP]"
}
else
{
SzLevels = "[Player]"
}
if (!equal(name, SzTag, SzTagLnegth))
{
if (is_user_alive(id))
{
format(message, 255, "^x04%s %s ^x03%s ^x01: %s", SzLevels, SzTag, name, chat)
color_chat(0, id, message)
}
else if (!is_user_alive(id) && userteam != CS_TEAM_SPECTATOR)
{
format(message, 255, "^x01*DEAD* ^x04%s %s ^x03%s ^x01: %s", SzLevels, SzTag, name, chat)
color_chat(0, id, message)
}
else
{
format(message, 255, "^x01*SPEC* ^x04%s %s ^x03%s ^x01: %s", SzLevels, SzTag, name, chat)
color_chat(0, id, message)
}
}
return PLUGIN_HANDLED
}
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others