Raised This Month: $ Target: $400
 0% 

random msg


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-10-2010 , 20:42   Re: random msg
Reply With Quote #21

Quote:
Originally Posted by FlyingHorse View Post
or i could just do this?
PHP Code:
#include <amxmodx>
#include <colorchat>

#define MAX_MSG 4

new const PLUGIN[ ] = "Advertisements"
new const VERSION[ ] = "1.0"
new const AUTHOR[ ] = "FlyingHorse"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
set_task(30.0"advertisements"id___"b");
}

public 
advertisements(id)
{
    switch (
random_num(1MAX_MSG))
    {
        case 
1:
        {
            
ColorChat(idRED"lol")
        }
        case 
2:
        {
            
ColorChat(idRED"blah")
        }
        case 
3:
        {
            
ColorChat(idRED"Drekes has a ponytail!")
        }
        case 
4:
        {
            
ColorChat(idRED"omfg")
        }
    }

If you just 'test' your codes then you would know if they worked.
__________________
fysiks is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 06-10-2010 , 22:19   Re: random msg
Reply With Quote #22

Quote:
Originally Posted by wrecked_ View Post
Fixed. =]

Code:
new const strings[][] =
{ "lol",
"stuff",
"more",
"dotdotdot" } new iCount

func() { client_print( 0, print_chat, "%s", strings[iCount++%sizeof strings] ) }

Use Wrecked_ way.
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave 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 13:05.


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