AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can somebody convert this adminmod plugin please? (https://forums.alliedmods.net/showthread.php?t=28078)

Bidybag 05-06-2006 19:10

Can somebody convert this adminmod plugin please?
 
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;
}

Peli 05-06-2006 19:39

Since you're not asking help about the actual plugin, this doesn't belong in this section - try the "Suggestions/Request" section.

Xanimos 05-06-2006 19:53

Don't bother posting there just use this its a better version that does the same thing.

http://forums.alliedmods.net/showthread.php?t=27814

Note: For future reference Admin mod code isn't portable. You have to explain what the plugin does so it can be recreated.

Bidybag 05-06-2006 19:58

I did explain.

That mod doesnt let you make a text message show every 5 min.

MaximusBrood 05-07-2006 08:46

Quote:

Originally Posted by Suicid3
Note: For future reference Admin mod code isn't portable. You have to explain what the plugin does so it can be recreated.

Thats right, but he wasn't talking about porting. He was talking about converting ;)


All times are GMT -4. The time now is 05:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.