AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Permanent message (https://forums.alliedmods.net/showthread.php?t=89124)

independent 04-02-2009 15:18

Permanent message
 
1 Attachment(s)
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.

YamiKaitou 04-02-2009 15:25

Re: Permanent message
 
Use pcvars

ConnorMcLeod 04-02-2009 15:31

Re: Permanent message
 
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.

independent 04-02-2009 15:51

Re: Permanent message
 
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. :)

Exolent[jNr] 04-02-2009 15:52

Re: Permanent message
 
pcvars are significantly faster.

YamiKaitou 04-02-2009 15:53

Re: Permanent message
 
pcvar is faster

joaquimandrade 04-02-2009 16:02

Re: Permanent message
 
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.

Alucard^ 04-02-2009 16:11

Re: Permanent message
 
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 (:

ConnorMcLeod 04-02-2009 16:20

Re: Permanent message
 
loop

independent 04-02-2009 16:50

Re: Permanent message
 
@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...?


All times are GMT -4. The time now is 21:15.

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