Please can somebody get this plugin working for amx. It just sends an auto message out every 5 min as a text message from me.
#include <core>
#include <string>
#include <admin>
#include <adminlib>
new AM_VERSION_STRING[] = "2.50.05";
public say_hello(Timer,Repeat,HLName,HLParam) {
new User[MAX_NAME_LENGTH];
new Msg[MAX_TEXT_LENGTH];
getstrvar("admin_connect_msg",Msg,MAX_TEXT_LE NGTH);
if ( Msg[0] == '0' && Msg[1] == '^0' ) return;
convert_string(HLName,User,MAX_NAME_LENGTH);
messageex(User,"Bidybag: To gamble and win a prize, this this in the chat: roll the dice",print_chat);
messageex(User,"Bidybag: To glow a different color, type this in the chat: glow help",print_chat);
messageex(User,"Bidybag: To use hook, type this in the console: bind x +hook .Replace X with the key you want to use",print_chat);
messageex(User,"Bidybag: ---GO TO CONSOLE TO SEE THIS MESSAGE AGAIN (button under escape key)---",print_chat);
}
public say_stuff(Timer,Repeat,HLName,HLParam) {
new Msg[MAX_TEXT_LENGTH];
getstrvar("admin_repeat_msg",Msg,MAX_TEXT_LEN GTH);
if ( Msg[0] == '0' && Msg[1] == '^0' ) return;
centersay(Msg,10,0,255,0);
say("Bidybag: To gamble and win a prize, this this in the chat: roll the dice");
say("Bidybag: To glow a different color, type this in the chat: glow help");
say("Bidybag: To use hook, type this in the console: bind x +hook .Replace X with the key you want to use");
say("Bidybag: ---GO TO CONSOLE TO SEE THIS MESSAGE AGAIN (button under escape key)---");
}
public plugin_connect(HLUserName, HLIP, UserIndex) {
set_timer("say_hello",45,0);
return PLUGIN_CONTINUE;
}
public plugin_init() {
plugin_registerinfo("Auto-Messaging Plugin","Shows message on connect, as well as a message every x minutes.",AM_VERSION_STRING);
new iRepeatInterval = getvar("admin_repeat_freq");
if ( iRepeatInterval >= 15 ) {
set_timer("say_stuff", iRepeatInterval, 99999);
}
return PLUGIN_CONTINUE;
}
|