中狼
|
分享:
▼
x0
|
[1.6][插件] SMA 再次失敗 有人教教嗎
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN_NAME "1" #define PLUGIN_VERSION "2" #define PLUGIN_AUTHOR "3" 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_A)){ if(is_user_alive(id)) { format(message,127,"^x04[伺服器OP - EXIA] ^x03%s^x04: %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,"^x01*死亡*^x03[伺服器OP - EXIA] ^x03%s^x04: %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,"^x01*觀戰者*^x03[伺服器OP - EXIA] ^x03%s^x04: %s",name,text) client_color(0,id,message) } } else if ((get_user_flags(id) & ADMIN_RESERVATION)){ if(is_user_alive(id)) { format(message,127,"^x04[管理員] ^x03%s^x04: %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,"^x01*死亡*^x03[管理員] ^x03%s^x04: %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,"^x01*觀戰者*^x03[管理員] ^x03%s^x04: %s",name,text) client_color(0,id,message) } } else { if(is_user_alive(id)) { format(message,127,"^x01[玩家] ^x03%s^x03: %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,"^x01*死亡* ^x03%s^x03: %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,"^x01*觀戰者* ^x03%s^x03: %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() }
[ 此文章被中狼在2011-12-07 20:01重新編輯 ]
|
重返CS.
|
x0
[樓 主]
From:香港特別行政區 | Posted:2011-12-04 20:27 |
|
|
JrC
|
分享:
▲
▼
#include <amxmodx> #include <amxmisc> #include <cstrike>
#define PLUGIN_NAME "1" #define PLUGIN_VERSION "2" #define PLUGIN_AUTHOR "3"
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_A)){ if(is_user_alive(id)) { format(message,127,"^x03[伺服器OP] ^x03%s^x03: %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[伺服器OP] ^x03%s^x03: %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[伺服器OP] ^x03%s^x03: %s",name,text) client_color(0,id,message) } }
else if ((get_user_flags(id) & ADMIN_RESERVATION)){ if(is_user_alive(id)) { format(message,127,"^x03[管理員] ^x03%s^x03: %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[管理員] ^x03%s^x03: %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[管理員] ^x03%s^x03: %s",name,text) client_color(0,id,message) } }
else { if(is_user_alive(id)) { format(message,127,"^x03[玩家] ^x03%s^x03: %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^x03: %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^x03: %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() }
//你沒有錯阿.. 只是{}對不齊.
|
NTFS伺服器 論壇: http://ntfs-server.com/forums
|
x0
[1 樓]
From:未知地址 | Posted:2011-12-05 21:58 |
|
|
|