Raised This Month: $ Target: $400
 0% 

Reliable CHannel Overflow


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 06-21-2007 , 07:35   Re: Reliable CHannel Overflow
Reply With Quote #1

well how can I do it differently Master?
updated code:
Code:
#include <amxmodx> #include <amxmisc> #define MAXLINES 11 new msg_file[128]; new ReadData[512]; new MsgSayText; new ads[MAXLINES][256] new atline = 0; public plugin_init() {     register_plugin("Message Display", "1.0", "Rolnaaba");         register_cvar("msg_delay", "120.0"); //how long between each message (seconds)         MsgSayText = get_user_msgid("SayText");         load_message();         set_task(get_cvar_float("msg_delay"), "display_message"); } public load_message() {     get_configsdir(msg_file, 127);     formatex(msg_file, 127, "%s/message.ini", msg_file);                 new file = fopen(msg_file, "r");               if(file) {                   while(!feof(file)) {             fgets(file, ReadData, 511);                         if(ReadData[0] == ';')                 continue;             if(atline >= MAXLINES) {                 log_amx("Message too long, cutting it off atline = %i", atline);                 continue;             }                             copy(ads[atline], 511, ReadData);             atline++;         }         fclose(file);                 for(new i; i <= atline; i++) {             formatex(ads[i], 255, "^x04%s", ads[i]);         }     } else {         log_amx("Unable to find message.ini, Plugin Failed. Please place message.ini into your configs folder!");                 set_fail_state("Unable to find message.ini, Plugin Failed. Please place message.ini into your configs folder!");     } } public display_message() {     new players[32], num;     get_players(players, num);         for(new i; i <= atline; i++) {         message_begin(MSG_BROADCAST, MsgSayText);         write_byte(0);         write_string(ads[i]);         message_end();     }         set_task(get_cvar_float("msg_delay"), "load_message"); }
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 06-21-2007 at 07:42.
Rolnaaba is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:25.


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