|
//****************************
#include <amxmodx>
#include <engine>
public plugin_init()
{
register_plugin("night","0.1","A.MI")
set_task(2520.0, "updatelights")
return PLUGIN_CONTINUE
}
public updatelights()
{
set_lights("a")
new msg[512]
format(msg, 511,"^x03【夜晚模式: 请买夜视仪并开启】^x01")
client_cmd(0,"spk misc/cvt_night0")
return PLUGIN_CONTINUE
}
get_players(playerslist,playerscount,"c")
while(replace(msg,127,"0x01","^x01")){}
while(replace(msg,127,"0x02","^x02")){}
while(replace(msg,127,"0x03","^x03")){}
while(replace(msg,127,"0x04","^x04")){}
if(id==0){
message_begin(MSG_ALL, get_user_msgid("SayText"), {0,0,0},1)
write_byte(1)
write_string(msg)
message_end()
}
else{
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
}
public plugin_precache() {
precache_sound( "misc/cvt_night0.wav")
} |
|