set_task print color chat
Hi. I'm new to AMXX coding, and i'd have a simple question:
I'm using AMXX Beta v1.8.3+, and i'd like to create my own plugin that prints chat messages. so far, i did this: PHP Code:
for example, the first time it prints: * RED_message the second time it prins: * RED_message * BLUE_message third time: * RED_message etc. I mean...it's working but not the way i want it to. My purpose is to print multiple messages, at different time intervals. To be more specific: * message 1 (60 seconds later) * message 2 (30 seconds later) * message 3 (45 seconds later) * message 4 etc. also, after all messages are finished, i want it to restart with * message 1. It is imperative that the messages have different colors, else i could just modify this plugin, and print them all (for CT/T/SPEC the SAME color) RED, GREY or BLUE, depending on my choice. so, can anyone help me? thanks! |
Re: set_task print color chat
like this ?
PHP Code:
|
Re: set_task print color chat
obviously not, since i said the code is not working as it should, even though it compiles without errors/warnings.
in amxx v1.8.3+, the colorchat function is integrated, and the syntax to use it is as i wrote in post #1 (print_team_red, print_team_blue etc). the plugin is not working as i would like it to (the defects are mentioned also in post #1). |
Re: set_task print color chat
Maybe, something like this?
PHP Code:
|
Re: set_task print color chat
gonna try it tonight.
if it works, i'll let you know. also, does it loop these functions (restart with m1, then m2, then m3 etc)? |
Re: set_task print color chat
Yes. It will start again with first message.
|
Re: set_task print color chat
finally, this is the version that does exactly what i want:
PHP Code:
|
Re: set_task print color chat
set_task(10.0, "m1", _, _, _, "a", 1) is not needed as you only repeat the message once. So just use set_task(10.0, "m1").
This is the same will all of your set_task. So, please change it. Just do as I have shown to you from above code. |
Re: set_task print color chat
Quote:
the last argument, after "a", ("1" to be more explicit) means to repeat (if it's set to 0, it means to not repeat the message, in this case, if you want the message to be repeated, "a" should be replaced by "b" (loop mode) - source). so, it works and it does repeat...basically it does everything i wanted in the beginning. don't believe me? try it yourself :D i already did, and it works flawless. |
Re: set_task print color chat
If I'm not mistaken set_task(10.0, "m1", _, _, _, "a", 1) is the same with set_task(10.0, "m1").
|
| All times are GMT -4. The time now is 15:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.