Raised This Month: $12 Target: $400
 3% 

Permanent message


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   Exolent[jNr] (178)
independent
Member
Join Date: Jan 2009
Location: Bulgaria, Sofia
Old 04-02-2009 , 15:18   Permanent message
Reply With Quote #1

Special thanks to: hateYou, ConnorMcLeod, xPaw, darkspeed!
Description: shows permanent hud message to group of players or everyone.
Modules: no.
Version: 1.1

WARNING!!! The plugin requires at least AMX Mod X 1.8.0!

CVARS:

amx_permanent_message "Your/nadvertisement%new%here"
What to be the message?
You can use %new% or /n for new line.

amx_permanent_message_color "255 255 255"
Color of the message with RGB?
You can see codes here!

amx_permanent_message_location "3"
Where to be the message?
1: top-left(on the radar)
2: top-middle
3: top-right
4: middle-left
5: center
6: middle-right
7: bottom-left(over health)
8: bottom-middle(over timer)
9: bottom-right(over money)

amx_permanent_message_effects "0"
Effects of message?
0: fade in/out
1: scintillation
2: writing

amx_permanent_message_show "0"
To who send the permanent message?
0: everyone
1: not alive
2: alive
3: admins
4: players
5: alive admins
6: not alive admins
7: alive players
8: not alive players

amx_permanent_message_cmd "1"
To have the admin command "amx_perm_msg"?


Admin command:

amx_perm_msg "Your new message"
Set the permanent message. It have to "amx_permanent_message_cmd" = "1". Requires "m" flag(ADMIN_LEVEL_A).


Changelog:
  • 0.1
    • First release.
  • 0.2
    • Added 1 cvar.
      • amx_permanent_message_effects
  • 0.3
    • Added string: %new%
  • 0.3a
    • Using ShowSyncHudMsg instead show_hudmessage.
  • 1.0
    • The plugin works with set_task в plugin_init.
    • Added 2 cvars.
      • amx_permanent_message_location
      • amx_permanent_message_show
    • Modified 2 cvars.
      • amx_permanent_message
      • amx_permanent_message_color
  • 1.1
    • Added 1 cvar.
      • amx_permanent_message_cmd
    • Added admin command.
      • amx_perm_msg.
Attached Files
File Type: sma Get Plugin or Get Source (permanent_message.sma - 12990 views - 5.9 KB)

Last edited by independent; 08-26-2009 at 12:57. Reason: 1.1 Update
independent is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-02-2009 , 15:25   Re: Permanent message
Reply With Quote #2

Use pcvars
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-02-2009 , 15:31   Re: Permanent message
Reply With Quote #3

effects = clamp(get_cvar_num("amx_permanent_message_eff ects"), 0, 2)

would be better, and yes, use pcvars.

Since a round can be 9minutes, you should replace 500.0 with 540.0, but the message will still be deleted as soon as another plugin will use the same channel.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
independent
Member
Join Date: Jan 2009
Location: Bulgaria, Sofia
Old 04-02-2009 , 15:51   Re: Permanent message
Reply With Quote #4

Thank you both!

@ConnorMcLeod, i know for the channels.
It will shows again on end of the round.
Easy to put one task in plugin_init, but it will heavy this task.

One more thing, what is the difference of cvar and pcvar? Just to know for future.
independent is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-02-2009 , 15:52   Re: Permanent message
Reply With Quote #5

pcvars are significantly faster.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-02-2009 , 15:53   Re: Permanent message
Reply With Quote #6

pcvar is faster
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-02-2009 , 16:02   Re: Permanent message
Reply With Quote #7

If you say: "daddy please bring me the beer that is in the fridge", your daddy will take more time to find it than if you say "daddy please bring me the beer that is in the second shelf of the fridge, next to the milk". But, don't fool your daddy. Otherwise you can have to drink the milk instead.
__________________
joaquimandrade is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 04-02-2009 , 16:11   Re: Permanent message
Reply With Quote #8

i have a question...

i used for a long time.. this:

PHP Code:
// credits: Emp`, dor123

#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "Timeleft mapname & web"
#define AUTHOR    "Alucard"
#define VERSION    "1.0"

new HUDSYNCmapname[64];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
get_mapname(mapname,63);
    
set_task(1.0,"timer_task",_,"",0,"b");
    
HUDSYNC CreateHudSyncObj();
}


public 
timer_task() {

    static 
gmtmscoreboard[128];
    
gmtm get_timeleft();
    for(new 
i=1;i<=32;i++) {

        if(
is_user_connected(i) && is_user_alive(i) ) {
                
formatex(scoreboard127"| TL: %02d:%02d | www.nv-arg.com.ar | Map: %s |",(gmtm 60),(gmtm 60), mapname );
                
set_hudmessage(808080, -1.00.0200.02.00.00.22);
                
ShowSyncHudMsgiHUDSYNCscoreboard );
    }
    }

what plugin is better?

well, i know that the "Permament message" independent have more things, cvars, etc... but i am asking about the way to do a PERMANENT MESSAGE...

thx

good plugin (:
Alucard^ is offline
Send a message via Skype™ to Alucard^
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-02-2009 , 16:20   Re: Permanent message
Reply With Quote #9

loop
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
independent
Member
Join Date: Jan 2009
Location: Bulgaria, Sofia
Old 04-02-2009 , 16:50   Re: Permanent message
Reply With Quote #10

@Alucard^, i don't understand what do you want(i'm not good at english).
But.. and both of the plugins works together.
http://store.picbg.net/pubpic/7F/2F/...50128c7f2f.JPG
Do you want to couple the plugins or...?
independent is offline
Reply


Thread Tools
Display Modes

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 17:13.


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