Raised This Month: $ Target: $400
 0% 

[Solved] hud ^n on Lang


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-21-2015 , 05:08   [Solved] hud ^n on Lang
Reply With Quote #1

^n is not working on hud with langfile
Code:
PHP Code:
#include <amxmodx>
#include <colorchat>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new mismatch;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /hud","show_hud");
    
register_clcmd("say /print","show_print");
    
    
register_dictionary_colored("show.txt");
    
mismatch CreateHudSyncObj();    
}

public 
show_hud(id)
{
    
set_hudmessage(2552552550.340.2216.06.0);
    
ShowSyncHudMsg(id,mismatch,"%L"LANG_PLAYER,"HUD_SHOW");
}

public 
show_print(id)
{
    
ColorChat(id,GREEN,"%L",LANG_PLAYER,"PRINT_SHOW")

Image:
[IMG]http://s2.************/5dbhek0tl/de_dust20001.png[/IMG]
Attached Files
File Type: sma Get Plugin or Get Source (try.sma - 494 views - 605 Bytes)
File Type: txt show.txt (139 Bytes, 128 views)

Last edited by indraraj striker; 07-21-2015 at 06:36.
indraraj striker is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-21-2015 , 05:41   Re: [Problem] hud ^n on Lang
Reply With Quote #2

Try replacing "^n" with "%c" in the lang file, and passing additional '^n' arguments to the function call:
Code:
[en]
HUD_SHOW=Welcome to the server%cServer mod by xD%cUnder Maintenance
PHP Code:
ShowSyncHudMsg(id,mismatch,"%L"LANG_PLAYER,"HUD_SHOW"'^n''^n'); 
klippy is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-21-2015 , 06:13   Re: [Problem] hud ^n on Lang
Reply With Quote #3

Thanks a lot @KliPPy
Finally solved #tired i was trying from 2 hours

Edited: But can any body tell me the reason why ^n is not working ?

Last edited by indraraj striker; 07-21-2015 at 06:28.
indraraj striker is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-21-2015 , 06:28   Re: [Problem] hud ^n on Lang
Reply With Quote #4

It's register_dictionary_colored fault.
__________________
Arkshine is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-21-2015 , 06:32   Re: [Problem] hud ^n on Lang
Reply With Quote #5

@Arkshine thanks
if possible please update the colorchat.inc and fix ^n
indraraj striker is offline
Old 07-22-2015, 20:12
Hartmann
This message has been deleted by Hartmann.
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 08:48.


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