Участник
Пользователь
- Сообщения
- 278
- Реакции
- 137
Hi,
There is a plugin which disables start up motd. It works perfect fine but I wonder if I could make it with reapi version or it's best enough.
I tried it but I couldn't.
There is a plugin which disables start up motd. It works perfect fine but I wonder if I could make it with reapi version or it's best enough.
I tried it but I couldn't.
Код:
#pragma semicolon 1
#include <amxmodx>
#define PLUGIN_NAME "Disable Startup Motd"
#define PLUGIN_VERS "1.0"
#define PLUGIN_AUTH "Sn!ff3r"
new bool:g_saw[MAX_PLAYERS + 1];
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERS, PLUGIN_AUTH);
register_message(get_user_msgid("MOTD"), "@Message_MOTD");
}
public client_connect(id) {
g_saw[id] = false;
}
@Message_MOTD(const msgID, const msgDest, const msgEntity) {
if(!g_saw[msgEntity] && get_msg_arg_int(1) == 1) {
g_saw[msgEntity] = true;
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}