Raised This Month: $53 Target: $400
 13% 

Mesage fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raducuursu
Junior Member
Join Date: Sep 2012
Old 09-07-2013 , 04:37   Mesage fix
Reply With Quote #1

anyone who can fix this bug, messages appear one after another
should not appear the same message 2 times in a row

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include <colorchat>

#define PLUGIN "Messages Shower"
#define VERSION "1.0"
#define AUTHOR "Alka"

#define ADVERTISING_TIME 35.0

stock const messages [ ] [ ] =
{
    
"^x04[ZP]^x01 Te rugam sa citesti regulamentul pe^x03 http://csoutstanding.com",
    
"^x04[ZP]^x01 IP: ^x04178.168.55.213 ^x01PORT: ^x0327015",
    
"^x04[ZP]^x01 Type^x03 /donate^x04 <name> <packs>^x01 to donate ammo packs!",
    
"^x04Co-Owner^x01+^x04Vip ^x03PERMANENT ^x045Euro ^x03Cosmote/Paypal^x01! : ^x03add ! [email protected] ^x01!",
    
"^x04[ZP]^x01Thank you for your decision you made!^x03 .:: HellZm.CsOutStanding.Com ::."
}

public 
plugin_init ( )
{
    
register_plugin PLUGINVERSIONAUTHOR )
    
    
set_task ADVERTISING_TIME"show_messages"___,"b" );
}

public 
show_messages ( )
{
    
client_print_color(0Grey"%s"messages[random(sizeof messages)])

raducuursu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-07-2013 , 05:14   Re: Mesage fix
Reply With Quote #2

Fixed your problem + added support for next amxx release (or actual builds).
Also, amxx version on your server is outdated.

PHP Code:
#include < amxmodx >

#if !defined client_print_color // fix for amx1.8.3
    #include < colorchat >
#else
    #define Grey print_team_grey
#endif

#define PLUGIN "Messages Shower"
#define VERSION "1.1"
#define AUTHOR "Alka"

#define ADVERTISING_TIME 35.0

new const messages [ ] [ ] =
{
    
"^4[ZP]^1 Te rugam sa citesti regulamentul pe^3 http://csoutstanding.com",
    
"^4[ZP]^1 IP: ^4178.168.55.213 ^1PORT: ^327015",
    
"^4[ZP]^1 Type^3 /donate^4 <name> <packs>^1 to donate ammo packs!",
    
"^4Co-Owner^1+^4Vip ^3PERMANENT ^45Euro ^3Cosmote/Paypal^1! : ^3add ! [email protected] ^1!",
    
"^4[ZP]^1Thank you for your decision you made!^3 .:: HellZm.CsOutStanding.Com ::."
};

public 
plugin_init ( )
{
    
register_plugin PLUGINVERSIONAUTHOR );

    
set_task ADVERTISING_TIME"show_messages"___,"b" );
}

public 
show_messages ( )
{
    static 
count = -1;
    if( ++
count >= sizeof(messages) )
    {
        
count 0;
    }
    
client_print_color(0Greymessagescount ]);

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 09-07-2013 at 05:16.
ConnorMcLeod is offline
raducuursu
Junior Member
Join Date: Sep 2012
Old 09-07-2013 , 06:39   Re: Mesage fix
Reply With Quote #3

thanks
raducuursu is offline
Reply


Thread Tools
Display Modes

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 13:45.


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