Hello, can someone help me in this code. I wanna to make for example. If someone is admin says
[Admin] [Fama: %d] [Nivel: %d] Nazy.- : hello
I mean, if the user is admin, at the start of chat appears [Admin], someone can helps?
PHP Code:
/*================================================================================
[Client Commands]
=================================================================================*/
// Chat say
public clcmd_say(id)
{
static said[89]
read_args(said, charsmax(said))
remove_quotes(said)
replace_all(said, charsmax(said), "%", " ")
// Don't say nothing
if (count_characters(said) < 1) return PLUGIN_HANDLED;
// Prevent chat from a player calling many times in a minute
static Float:chat_time[33]
if (get_gametime() - chat_time[id] < 2.0) return PLUGIN_HANDLED;
chat_time[id] = get_gametime()
// Get unblock words
static buffer[100]
for (new i = 0; i < ArraySize(g_unblock_words); i++)
{
ArrayGetString(g_unblock_words, i, buffer, charsmax(buffer))
if (equal(said, buffer)) return PLUGIN_CONTINUE;
}
// Get his team and change the chat type and colors
static message[156]
switch (fm_cs_get_user_team(id))
{
case FM_CS_TEAM_UNASSIGNED: formatex(message, charsmax(message), "^x01*UNASSIGNED* ^x03 %s^x01: %s", g_playername[id], said)
case FM_CS_TEAM_T, FM_CS_TEAM_CT: formatex(message, charsmax(message), "^x01%s[Fama:^x04 %d^x01][Nivel:^x04 %d^x01]^x03 %s^x01: %s", g_isalive[id] ? "" : "DEAD", g_fame[id], g_level[id], g_playername[id], said)
case FM_CS_TEAM_SPECTATOR: formatex(message, charsmax(message), "^x01*SPEC* [Fama:^x04 %d^x01][Nivel:^x04 %d^x01]^x03 %s^x01: %s", g_fame[id], g_level[id], g_playername[id], said)
}
zp_colored_print(0, message)
return PLUGIN_HANDLED;
}
__________________
The universe is so infinite, but not as infinite as the errors in the plugins.