AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help displaying motd by say command (multi-language support) (https://forums.alliedmods.net/showthread.php?t=28709)

spunko 05-20-2006 20:15

help displaying motd by say command (multi-language support)
 
hi.. im having troubles with this.. i need to display help for a pluging with multi-language support in MOTD (like /top15), but it only appear 16 letters of the entire frase.. this is the code for the MOTD, everything works fine with my entire plugin except for the issue of the 16 letters.. pliz someone help me with it.. i dunno how to make it so it could display the hole frase i have in the langauge text file.

Code:
    register_clcmd("say /mahelp", "ma_help")
Code:
public ma_help(id) {     new motd[2048], title[16],  dpos = 0       format(title, 15,"%L", LANG_PLAYER,"KH_HELP0")         new K_HELP1[16], K_HELP2[16]         format(K_HELP1, 15, "%L", LANG_PLAYER, "KH_HELP1")     format(K_HELP2, 15, "%L", LANG_PLAYER, "KH_HELP2")         dpos += format(motd[dpos], 2047-dpos,"<html><head><style type=^"text/css^">pre{color:#FFB000;}body{background:#000000;margin-left:8px;margin-top:8px;}</style></head><pre><body>")     dpos += format(motd[dpos],2047-dpos, "%s ^n",K_HELP1)     dpos += format(motd[dpos],2047-dpos, "%s ^n",K_HELP2 )         show_motd(id, motd, title)           return PLUGIN_CONTINUE }

language file
Code:
[en] KH_HELP0 = MY PLUGING KH_HELP1 = I dunno what to do to see the entire line, it olny appear this: KH_HELP2 = I dunno what to   -   but no the rest

thanx..

Hawk552 05-20-2006 21:30

:arrow:

Code:
new K_HELP1[32], K_HELP2[32]         format(K_HELP1, 31, "%L", LANG_PLAYER, "KH_HELP1")     format(K_HELP2, 31, "%L", LANG_PLAYER, "KH_HELP2")

And doesn't LANG_PLAYER require an ID passed as well?

spunko 05-20-2006 22:11

coll thanx, you have helped me a lot.... im going to test it

so it has to be "LANG_SERVER" right?

Hawk552 05-20-2006 22:18

Quote:

Originally Posted by spunko
coll thanx, you have helped me a lot.... im going to test it

so it has to be "LANG_SERVER" right?

For this purpose, you should use LANG_PLAYER. LANG_SERVER will work, but it's a better design decision to use PLAYER.

spunko 05-20-2006 22:22

ok, i will use PLAYER then

thanx for your help man.. i really apreciate it, sometimes people doesn't help at all..

see ya.. karma for you.. :D


All times are GMT -4. The time now is 16:28.

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