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

).
Quote:
Originally Posted by FlyingHorse
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
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(0, RED, szMessages[random(sizeof(szMessages))])
// Or loop through players if you want them to have different messages.
}
__________________