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 07-04-2007 , 22:47   Re: Reliable CHannel Overflow
Reply With Quote #1

ok, I found a different way to do it, but I dont know if it will work, and I dont have anyway to test it right now. Can anyone spot anyhting bad, or can test this for me or anything.

Here is my new way. I stole loading from superhero, so it has a different while() loop.

Code:
#include <amxmodx> #include <amxmisc> #define MAXLINES 11 new file[128]; new readLine = 0; new lengthRead; new data[1024]; new MsgSayText; new ads[MAXLINES][192] new total_lines; 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", 0, "", 0, "b"); } public load_message() {     get_configsdir(file, 127);     formatex(file, 127, "%s/message.ini", file);                 if(!file_exists(file)) {         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!");     }     while((readLine = read_file(file, readLine, data, 1023, lengthRead)) != 0) {         if(equal(data[0], ";")) continue;         data[191] = '^0'         copy(ads[readLine], 191, data);                 total_lines++;     } } public display_message() {     new players[32], num;     get_players(players, num);         for(new i; i <= total_lines; i++) {         message_begin(MSG_BROADCAST, MsgSayText);         write_byte(0);         write_string(ads[i]);         message_end();     } }
__________________
DO NOT PM me about avp mod.
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:24.


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