|
發表於 11-1-2011 06:25:48
|
顯示全部樓層
register_clcmd("say_team","function_name")
public function_name(id)
{
new name[33]
new text[192]
get_user_name(id, name, 32)
read_args(text,191)
remove_quotes(text)
if (equal(text, ""))
return PLUGIN_HANDLED
new loop
switch (cs_get_user_team(id))
{
case CS_TEAM_CT:
{
for (loop = 1; loop <= maxplayers; loop++)
{
if (!is_user_connected(loop)) continue;
if (cs_get_user_team(loop) != CS_TEAM_CT) continue;
client_print(loop, print_chat, "[CT隊頻] %s : %s", name, test)
}
}
case CS_TEAM_T:
{
for (loop = 1; loop <= maxplayers; loop++)
{
if (!is_user_connected(loop)) continue;
if (cs_get_user_team(loop) != CS_TEAM_T) continue;
client_print(loop, print_chat, "[T隊頻] %s : %s", name, test)
}
}
}
return PLUGIN_HANDLED
} |
|