jses40813
|
分享:
▲
▼
public plugin_init() { set_task(1.0,"remind",888,_,_,"b") }
public show() { client_printc(0,"^x04输入^x03/re^04可以重设战绩") }
client_printc(target, const message[], any:...) { static buffer[512], i, argscount argscount = numargs() // Send to everyone if (!target) { static player for (player = 1; player <= get_maxplayers(); player++) { if (!is_user_connected(player)) continue;
static changed[5], changedcount changedcount = 0
for (i = 2; i < argscount; i++) { if (getarg(i) == LANG_PLAYER) { setarg(i, 0, player) changed[changedcount] = i changedcount++ } } vformat(buffer, charsmax(buffer), message, 3)
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, player) write_byte(player) write_string(buffer) message_end() for (i = 0; i < changedcount; i++) setarg(changed, 0, LANG_PLAYER) } } // Send to specific target else { vformat(buffer, charsmax(buffer), message, 3)
message_begin(MSG_ONE, get_user_msgid("SayText"), _, target) write_byte(target) write_string(buffer) message_end() } }
|