Raised This Month: $ Target: $400
 0% 

introduce hud msg with langfile


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BackStats
Senior Member
Join Date: Oct 2008
Old 10-11-2010 , 11:39   introduce hud msg with langfile
Reply With Quote #1

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
BackStats is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-11-2010 , 11:53   Re: introduce hud msg with langfile
Reply With Quote #2

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)

__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%

Last edited by SaM.ThE.MaN; 10-11-2010 at 17:02.
SaM.ThE.MaN is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 10-11-2010 , 12:02   Re: introduce hud msg with langfile
Reply With Quote #3

%L
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-11-2010 , 12:08   Re: introduce hud msg with langfile
Reply With Quote #4

Quote:
Originally Posted by lucas_7_94 View Post
%L
my bad
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
BackStats
Senior Member
Join Date: Oct 2008
Old 10-11-2010 , 14:05   Re: introduce hud msg with langfile
Reply With Quote #5

would not be %s?
BackStats is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-11-2010 , 16:09   Re: introduce hud msg with langfile
Reply With Quote #6

Quote:
Originally Posted by BackStats View Post
would not be %s?
Nope ...
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-11-2010 , 16:51   Re: introduce hud msg with langfile
Reply With Quote #7

%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
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-11-2010 , 17:03   Re: introduce hud msg with langfile
Reply With Quote #8

Quote:
Originally Posted by nikhilgupta345 View Post
%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
Lol ... I posted the quote outside the php coding ... Fixed#
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
BackStats
Senior Member
Join Date: Oct 2008
Old 10-11-2010 , 17:13   Re: introduce hud msg with langfile
Reply With Quote #9

Quote:
Originally Posted by SaM.ThE.MaN View Post
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
BackStats is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-11-2010 , 17:13   Re: introduce hud msg with langfile
Reply With Quote #10

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.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 10-11-2010 at 17:17.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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