AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Different method for hudmessage (https://forums.alliedmods.net/showthread.php?t=221809)

groofshark 07-26-2013 16:13

[SOLVED] Different method for hudmessage
 
Hello,
is there a chance when you type command /show to appear hudmessage in position No.1 ? But when you type the same command 2nd time, to appear again this hudmessage, but in position No.2 ? And the last 3rd time, when you type the same command, this message appear in position No.3... And after this operation back again... same command -> 1st position... same command -> 2nd position... same command -> 3rd position.

If there is a chance, can you show me how?

YamiKaitou 07-26-2013 18:58

Re: Different method for hudmessage
 
Yes it is possible

groofshark 07-26-2013 19:17

Re: Different method for hudmessage
 
Can you show me how?

pokemonmaster 07-26-2013 19:20

Re: Different method for hudmessage
 
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new const Float:g_flPositions[][] = {
    
// Y, X
    
0.25, -1.0 },
    { 
0.50, -1.0 },
    { 
0.75, -1.0 }
}

new const 
Float:HOLD_TIME 10.0
new const Float:FADE_IN_TIME 0.1
new const Float:FADE_OUT_TIME 0.1

enum _
:COLORS
{
    
255,
    
255,
    
0
}

new 
g_iPosCount
new g_iCommand[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)    
    
register_clcmd("say /command""CmdCommand")
    
    
g_iPosCount sizeof(g_flPositions)
}

public 
client_connect(id)
{
    
g_iCommand[id] = 0
}

public 
CmdCommand(id)
{
    
set_hudmessage(RGBg_flPositions[g_iCommand[id]][1], g_flPositions[g_iCommand[id]][0], 00.0HOLD_TIMEFADE_IN_TIMEFADE_OUT_TIME, -1)
    
show_hudmessage(id"Message :)")
    
    
g_iCommand[id]++
    
    if(
g_iCommand[id] == g_iPosCount)
    {
        
g_iCommand[id] = 0
    
}



groofshark 07-27-2013 07:03

Re: Different method for hudmessage
 
It works, thank you.


All times are GMT -4. The time now is 06:29.

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