AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blue text in menu? (https://forums.alliedmods.net/showthread.php?t=155104)

Change377 04-17-2011 15:00

Blue text in menu?
 
[img]http://img192.**************/img192/4650/menutryb.png[/img]

How to place in menu blue text? Red i know, /r - but blue?

JocAnis 04-17-2011 15:03

Re: Blue text in menu?
 
i think impossible, maybe thats:

menu only with:
...gry:
1.
2.
---
and 'Deathrun' and 'Freerun' are with 2 hudmessages...

Change377 04-17-2011 15:13

Re: Blue text in menu?
 
So you think that is precisely placed hudmessage next to the menu? Okey, maybe, but how to do that this hudmessage disappear in the same moment as menu (after click 1 or 2)?

JocAnis 04-17-2011 15:16

Re: Blue text in menu?
 
hm maybe:

when key is pressed, set hudmessage (to replace previously) with " " text

Change377 04-17-2011 15:17

Re: Blue text in menu?
 
I dont know how to do this, could you write me simple code? Menu + hudmsg?

JocAnis 04-17-2011 15:27

Re: Blue text in menu?
 
try this:
PHP Code:

public menuvoteid )
{
new 
menu menu_create"Vote for:""vote_keys" )

menu_additemmenu" ""1" )//if this doesnt work try with: menu_additem( menu, "-", "1" )
menu_additemmenu"\rFreeRun""2" )

menu_displaymenu )

set_hudmessage0501700.050.400.08.00.00.0)
show_hudmessageid"DeathRun" )
return 
PLUGIN_HANDLED
}
public 
vote_keysidmenukeys )
{
if( 
item == MENU_EXIT )
{
menu_destroymenu )
return 
PLUGIN_HANDLED
}
switch( 
item )
{
case 
0:vote_for_dr++
case 
1:vote_for_fr++
}
set_hudmessage0000.050.400.00.50.00.0)
show_hudmessageid"-" 
menu_destroymenu )
return 
PLUGIN_HANDLED



Change377 04-17-2011 15:49

Re: Blue text in menu?
 
Okey, its almost correct color and position - it could be corrected, but this hudmsg dissapear after a few seconds, even i didn't choose any option.
If i choose 1. or 2. the hudmsg dissapear correctly


Color: Now I can see that red and blue in my menu is normal, a bit transparent. And in this screenshot i've placed the text isnt transparent at all. Maybe it's not hudmsg?

Change377 05-03-2011 05:55

Re: Blue text in menu?
 
REFRESH

SonicSonedit 05-03-2011 07:11

Re: Blue text in menu?
 
Change377

set_hudmessage( 0, 50, 170, 0.05, 0.4, 0, 0.0, 8.0, 0.0, 0.0, 1 )
show_hudmessage( id, "DeathRun" )

=>

set_hudmessage( 0, 50, 170, 0.05, 0.4, 0, 0.0, 3600.0, 0.0, 0.0, 1 )
show_hudmessage( id, "DeathRun" )


Beware unhandled exceptions, when menu was cancelled by some other plugin, for example.


All times are GMT -4. The time now is 20:10.

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