Raised This Month: $51 Target: $400
 12% 

Dictionary and Hud Message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-29-2011 , 16:37   Dictionary and Hud Message
Reply With Quote #1

Originally my hud message was hard coded into the plugin. When deciding to create the dictionary file i moved all the text fromt he plugin to the dictionary

This is my Hud i need
[Class: %s] ^n[Rank: %s] ^n[XP: %d / %d]

When its in the plugin it shows like this
[Class: Special Ops]
[Rank: Private]
[XP: 0 / 100]

When i switched to multilangual its now like this
[Class: Special Ops] ^n[Rank: Private] ^n[XP: 0 / 100]

Just an FYI i use Conors color chat include (stock version) and have to use register_dictionary_color

Any ideas on makeing it on 3 lines? (without 3 sepeart huds)

Last edited by Doc-Holiday; 12-29-2011 at 16:38.
Doc-Holiday is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2011 , 17:35   Re: Dictionary and Hud Message
Reply With Quote #2

You can't use Pawn escape characters in non-Pawn places. The colorchat dictionary stuff would need to be coded to parse the escape characters and put in their Pawn interpreted value.
__________________
fysiks is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-29-2011 , 17:52   Re: Dictionary and Hud Message
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
You can't use Pawn escape characters in non-Pawn places. The colorchat dictionary stuff would need to be coded to parse the escape characters and put in their Pawn interpreted value.
Is there a way to do that?

Or should i just keep that in the code instead of adding it to the dictionary
Doc-Holiday is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 12-29-2011 , 18:05   Re: Dictionary and Hud Message
Reply With Quote #4

Maybe you can make 3 seperate keys for the hud.

format your hud like this:
PHP Code:
show_hudmessage(id"[%L: %s] ^n[%L: %s] ^n[%L: %d / %d]"idKEY1szClass[id], idKEY2/* and so on... */ 
Code:
KEY1 = Class
KEY2 = Rank
KEY3 = XP
I'm not sure about this & i'm not too familiar with ML, let us know if it works.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2011 , 18:43   Re: Dictionary and Hud Message
Reply With Quote #5

I think that is a good idea drekes. It's simple and doesn't require editing existing function scripts.
__________________
fysiks is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-29-2011 , 19:29   Re: Dictionary and Hud Message
Reply With Quote #6

Quote:
Originally Posted by drekes View Post
Maybe you can make 3 seperate keys for the hud.

format your hud like this:
PHP Code:
show_hudmessage(id"[%L: %s] ^n[%L: %s] ^n[%L: %d / %d]"idKEY1szClass[id], idKEY2/* and so on... */ 
Code:
KEY1 = Class
KEY2 = Rank
KEY3 = XP
I'm not sure about this & i'm not too familiar with ML, let us know if it works.
Wow.. never new you could do that.. Worked perfectly. thanks.
Doc-Holiday is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 12-29-2011 , 21:07   Re: Dictionary and Hud Message
Reply With Quote #7

Good to know, good luck with your plugin.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Reply



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 20:39.


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