AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hud Messages (https://forums.alliedmods.net/showthread.php?t=105863)

StormZone 10-09-2009 09:17

Hud Messages
 
Hy y put in a plugin this HUD messages

Code:

            set_hudmessage(0, 255, 255, 0.0, 0.55, 0, 6.0, 3.0)
            show_hudmessage(id, "mesage")

The plugin has his own .txt file in data/lang

How can y make the "show_hudmessage(id, "mesage")" do display a message from .txt file like this

message = You just bought.....

+ Karma

SnoW 10-09-2009 09:48

Re: Hud Messages
 
There's multilingual tutorial in the wiki.

StormZone 10-09-2009 10:06

Re: Hud Messages
 
yes great help.
If y would have found it y wouldnt post here anymore man :)

Arkshine 10-09-2009 10:31

Re: Hud Messages
 
// plugin_init()
register_dictionary( "mydictionary.txt" );

// in your function()
show_hudmessage(id, "%L", id, "MY_KEYLANG");

// in your mydictionary.txt file
[en]
MY_KEYLANG = blabla.

StormZone 10-09-2009 10:37

Re: Hud Messages
 
thanks alot ark.
you are the best :D

Arkshine 10-09-2009 10:38

Re: Hud Messages
 
In the case you pass 0 as id, you have to write : show_hudmessage(0, "%L", LANG_PLAYER, "MY_KEYLANG");

StormZone 10-09-2009 10:43

Re: Hud Messages
 
no it will be id.
it will display only to the user that usez that function.

StormZone 10-09-2009 12:55

Re: Hud Messages
 
Well one more little problem.
The hud mesages apears and it last as much as it set but if y aim at a player and its displays his name the hud mesages disapears.
Any fix for that?

Arkshine 10-09-2009 13:27

Re: Hud Messages
 
Because you have probably another plugin which show a HUD message on the same channel. Try to change channel :

set_hudmessage(0, 255, 255, 0.0, 0.55, 0, 6.0, 3.0, 1) ( 1 -> 4 )

StormZone 10-09-2009 13:38

Re: Hud Messages
 
so y can chose betwen 1 and 4 channels yes?

EDIT:
Y did it like this and y get a tag mismatch error at the first line
PHP Code:

            set_hudmessage(id2552550.00.5506.05.01)
            
show_hudmessage(id"%L"LANG_PLAYER"SM3_HEAL"MOD); 



All times are GMT -4. The time now is 22:41.

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