announcement plugin
hello
I created a plugin for my server announcement. However, does not work. How can I resolve this problem I do? amxx.cfg PHP Code:
PHP Code:
|
Re: announcement plugin
Damn, that's horrible. Either way, try using enum, look in the tutorial sections..
enum { ANC_1, ANC_2, ANC_3 }; |
Re: announcement plugin
client_print(0, print_chat, "%s", get_pcvar_num(announcement_detail_1))
you should use get_pcvar_string not num Example: PHP Code:
|
Re: announcement plugin
Hard-coded to 5 announcements, better code than before.
Spoiler
More efficient to allow 0 to infinite announcements.
Spoiler
The 2nd code removes the announce_# cvar. Also, the # in announcement_detail has been removed. So it looks like this: Code:
announce 1That is how you can disable your announcements. |
Re: announcement plugin
@DjOptimuS
thanks!! @Exolent[jNr] thanks!! i used this XD |
Re: announcement plugin
I made something similiar while ago, some kind of reminder.
It may help you:
Spoiler
Exolent can you explain ArrayGetStringHandle, haven't seen it before, on amxmodx wiki says DoNotUse .. |
Re: announcement plugin
Code:
The difference is that the first doesn't require it to be stored in a variable, which also allows you to save some memory. It may say do not use, but is perfectly safe if not used incorrectly. It is even used in one of the base AMXX plugins (maybe map chooser or something). |
| All times are GMT -4. The time now is 06:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.