Raised This Month: $ Target: $400
 0% 

random msg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-09-2010 , 12:47   Re: random msg
Reply With Quote #1

Quote:
Originally Posted by shuttle_wave View Post
my one or his version?
Your code does what I suggested already (you should know that ).

Quote:
Originally Posted by FlyingHorse View Post
ehm.. i wanted help to fix my code. I would have posted in suggestions, requests if i wanted a new plugin .. Im a beginner and im still learning. In fact i started like 2 weeks ago. I'd like help, not a new plugin, could anyone just help me fix whats not working in my code?
He didn't post a new plugin, he posted a plugin that shows you how to do it more efficiently. If you notice, his plugin will not do what you are trying to do.

Quote:
Originally Posted by grimvh2 View Post
I blame client_putinserver, try client_authorized or client_connect, else hook the Spawn event with ham.
I seriously doubt that is the problem. putinserver is probably one of the better ones to use.

@FlyingHorse, when you post code you can't just say "why doesn't this work," you need to explain what doesn't work about it. Does it compile? Does it have any errors? If it does compile and there are no errors you need to say that. This type of information will get you the best response.

Also, debugging is a skill everybody needs to learn. 1. It creates less posts here. 2. It will usually solve your problem much more promptly than waiting for people to respond to you post.

This is something that I would use:

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

new const szMessages[][] = {
    
"lol",
    
"blah",
    
"Drekes has a ponytail!",
    
"omfg"
}

public 
plugin_init()
{
    
// set_task()
}

public 
advertisements(id)
{
    
ColorChat(0REDszMessages[random(sizeof(szMessages))])
    
// Or loop through players if you want them to have different messages.

__________________

Last edited by fysiks; 06-09-2010 at 12:54.
fysiks 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 05:18.


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