|
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN_NAME "Colored Sign Chat"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "Arvy"
public plugin_init(){
register_plugin(PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_AUTHOR)
register_clcmd("say","sign_say",ADMIN_ALL,"- Colored Sign Chat")
}
public sign_say(id){
new text[64],name[32],message[128]
read_args (text,63)
remove_quotes(text)
get_user_name(id,name,31)
if ((get_user_flags(id) & ADMIN_LEVEL_B)){
if(is_user_alive(id))
{
format(message,127,"^x04【【天禄cEo】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) !=
CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*死亡*^x04【【天禄cEo】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*观察者*^x04【【天禄cEo】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
}
else if ((get_user_flags(id) & ADMIN_LEVEL_C)){
if(is_user_alive(id))
{
format(message,127,"^x04【【天禄协管员】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) !=
CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*死亡*^x04【【天禄协管员】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*观察者*^x04【【天禄协管员】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
}
else if ((get_user_flags(id) & ADMIN_LEVEL_D)){
if(is_user_alive(id))
{
format(message,127,"^x04【【天禄OP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) !=
CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*死亡*^x04【【天禄OP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*观察者*^x04【【天禄OP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
}
else if ((get_user_flags(id) & ADMIN_LEVEL_H)){
if(is_user_alive(id))
{
format(message,127,"^x04【【天禄超级VIP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) !=
CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*死亡*^x04【【天禄超级VIP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*观察者*^x04【【天禄超级VIP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
}
else if ((get_user_flags(id) & ADMIN_LEVEL_F)){
if(is_user_alive(id))
{
format(message,127,"^x04【【天禄VIP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) !=
CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*死亡*^x04【【天禄VIP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*观察者*^x04【【天禄VIP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
}
else if ((get_user_flags(id) & ADMIN_LEVEL_G)){
if(is_user_alive(id))
{
format(message,127,"^x04【【天禄美女OP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) !=
CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*死亡*^x04【【天禄美女OP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*观察者*^x04【【天禄美女OP】】^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
}
else {
if(is_user_alive(id))
{
format(message,127,"^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) !=
CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*死亡* ^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
{
format(message,127,"^x03*观察者* ^x03%s^x01: %s",name,text)
client_color(0,id,message)
}
}
return PLUGIN_HANDLED
}
public client_color(playerid, colorid, msg[]){
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),{0,0,0},playerid)
write_byte(colorid)
write_string(msg)
message_end()
}
|
|