AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   introduce hud msg with langfile (https://forums.alliedmods.net/showthread.php?t=140379)

BackStats 10-11-2010 11:39

introduce hud msg with langfile
 
I want to transform a message that is in print_chat.
to the center of the screen format hud

match_misc.sma
PHP Code:

match_scores(0,"MATCH_TEAM_WINALL"

match_misc.txt (LANG FILE)
PHP Code:

MATCH_TEAM_WINALL The %s have winner match


SaM.ThE.MaN 10-11-2010 11:53

Re: introduce hud msg with langfile
 
PHP Code:

// lang
register_dictionary"match_misc.txt" )

// Task
set_task1.0"match_misc",_,_,_"b")

public 
match_misc()
{
set_hudmessage(red=200green=100blue=0Float:x=-1.0Float:y=0.35effects=0Float:fxtime=6.0Float:holdtime=12.0Float:fadeintime=0.1Float:fadeouttime=0.2,channel=4);
show_hudmessage(0"The %L have winner match"0"MATCH_TEAM_WINALL)



lucas_7_94 10-11-2010 12:02

Re: introduce hud msg with langfile
 
%L

SaM.ThE.MaN 10-11-2010 12:08

Re: introduce hud msg with langfile
 
Quote:

Originally Posted by lucas_7_94 (Post 1322174)
%L

my bad :D

BackStats 10-11-2010 14:05

Re: introduce hud msg with langfile
 
would not be %s?

SaM.ThE.MaN 10-11-2010 16:09

Re: introduce hud msg with langfile
 
Quote:

Originally Posted by BackStats (Post 1322296)
would not be %s?

Nope ...

nikhilgupta345 10-11-2010 16:51

Re: introduce hud msg with langfile
 
%L is for the language file that is registered with register_dictionary. So when it says %L, and then at the end it says MATCH_TEAM_WINALL, it would print the MATCH_TEAM_WINALL line in the lang file. Oh, and you forgot to close the quotes at the end of that sam :P

SaM.ThE.MaN 10-11-2010 17:03

Re: introduce hud msg with langfile
 
Quote:

Originally Posted by nikhilgupta345 (Post 1322435)
%L is for the language file that is registered with register_dictionary. So when it says %L, and then at the end it says MATCH_TEAM_WINALL, it would print the MATCH_TEAM_WINALL line in the lang file. Oh, and you forgot to close the quotes at the end of that sam :P

Lol ... I posted the quote outside the php coding ... Fixed#

BackStats 10-11-2010 17:13

Re: introduce hud msg with langfile
 
Quote:

Originally Posted by SaM.ThE.MaN (Post 1322161)
PHP Code:

// lang
register_dictionary"match_misc.txt" )

// Task
set_task1.0"match_misc",_,_,_"b")

public 
match_misc()
{
set_hudmessage(red=200green=100blue=0Float:x=-1.0Float:y=0.35effects=0Float:fxtime=6.0Float:holdtime=12.0Float:fadeintime=0.1Float:fadeouttime=0.2,channel=4);
show_hudmessage(0"The %L have winner match"0"MATCH_TEAM_WINALL)



then it should look like this:
PHP Code:

show_hudmessage(0"MATCH_TEAM_WINALL) 

because it will get the message MATCH_TEAM_WINALL

nikhilgupta345 10-11-2010 17:13

Re: introduce hud msg with langfile
 
Still not fixed :O
Code:

// lang
register_dictionary( "match_misc.txt" )

// Task
set_task( 1.0, "match_misc",_,_,_, "b")

public
match_misc()
{
set_hudmessage(red=200, green=100, blue=0, Float:x=-1.0, Float:y=0.35, effects=0, Float:fxtime=6.0, Float:holdtime=12.0, Float:fadeintime=0.1, Float:fadeouttime=0.2,channel=4);
show_hudmessage(0, "%L", 0, "MATCH_TEAM_WINALL")




There.


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

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