|
楼主 |
发表于 2013-4-16 22:38:18
|
显示全部楼层
来自 中国–贵州–贵阳
c12g34k56 发表于 2013-4-16 07:53
看看有源码吗
#include <amxmodx>
#include <amxmisc>
#include <messages>
public plugin_init()
{
register_event("ResetHUD", "MiaoZhunXing2", "be")
register_event("ResetHUD", "MiaoZhunXing", "be")
}
public MiaoZhunXing(id)
{
set_task(0.5,"miaozhunxing1",id,"",0,"be")
}
public miaozhunxing1(id)
{
if(get_user_flags(id) & ADMIN_IMMUNITY)
{
new g_kct[33]
new g_kt[33]
new g_death[33]
set_hudmessage(135, 206, 235,-1.0,0.45,0,5.0,0.5,0.1,0.5,9)
show_hudmessage(id,"-----^n[|+|]^n-----")
set_task(0.8,"miaozhunxing2",id,"",0,"1")
}
}
public MiaoZhunXing2(id)
{
if(get_user_flags(id) & ADMIN_IMMUNITY)
{
new name[33]
get_user_name(id,name[id],32)
client_printcolor(0,"/g< /ctr服务器会员/y %s /g【/ctr拥有瞄准镜/g】>",name[id])
}
}
stock client_printcolor(id, const input[], any:...)
{
static iPlayersNum[32], iCount; iCount = 1
static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4") // green txt
replace_all(szMsg, 190, "/y", "^1") // orange txt
replace_all(szMsg, 190, "/ctr", "^3") // team txt
replace_all(szMsg, 190, "/w", "^0") // team txt
if(id) iPlayersNum[0] = id
else get_players(iPlayersNum, iCount, "ch")
for (new i = 0; i < iCount; i++)
{
if (is_user_connected(iPlayersNum))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayersNum)
write_byte(iPlayersNum)
write_string(szMsg)
message_end()
}
}
}
作者:不二病 |
|