AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   a question about Lang file (https://forums.alliedmods.net/showthread.php?t=143613)

Jacob 11-22-2010 00:49

a question about Lang file
 
new const g_RankName[][] =
{
"name1","name2","name3","name4","name5"
}
is it possible to load namei from LANG file or cfg file?

fysiks 11-22-2010 00:59

Re: a question about Lang file
 
http://wiki.amxmodx.org/Advanced_Scr...ingual_Support

Jacob 11-22-2010 01:20

Re: a question about Lang file
 
Quote:

Originally Posted by fysiks (Post 1354238)

i mean to use LANG in variable.
eg:the code in plugin is like this
PHP Code:

new const g_RankName[][] =

"Newbie","Semi-Pro","Pro","Veteran"


if I want to use LANG file to load g_RankName,is it possible to achieve?
LANG file would be like this
[cn]
LEVELNAME1= Newbie
LEVELNAME2 = Semi-Pro
LEVELNAME3 = Pro
LEVELNAME4 = Veteran

K.K.Lv 11-22-2010 01:48

Re: a question about Lang file
 
Code:

new const g_RankName[][] =
{
  "LEVELNAME1",
  "LEVELNAME2",
  "LEVELNAME3",
  "LEVELNAME4"
}


Jacob 11-22-2010 02:10

Re: a question about Lang file
 
Quote:

Originally Posted by K.K.Lv (Post 1354250)
Code:

new const g_RankName[][] =
{
"LEVELNAME1",
"LEVELNAME2",
"LEVELNAME3",
"LEVELNAME4"
}


if do like this,g_RankName1 will be LEVELNAME1 but not Newbie.

K.K.Lv 11-22-2010 02:12

Re: a question about Lang file
 
show your full code !

Jacob 11-22-2010 02:49

Re: a question about Lang file
 
Quote:

Originally Posted by K.K.Lv (Post 1354258)
show your full code !

no code,i just thought of this question by chance.

Exolent[jNr] 11-22-2010 03:17

Re: a question about Lang file
 
Quote:

Originally Posted by Jacob (Post 1354262)
no code,i just thought of this question by chance.

Then why did you ask this question:

Quote:

Originally Posted by Jacob (Post 1354256)
if do like this,g_RankName1 will be LEVELNAME1 but not Newbie.

You didn't even test before asking.

Jacob 11-22-2010 05:14

Re: a question about Lang file
 
Quote:

Originally Posted by Exolent[jNr] (Post 1354268)
Then why did you ask this question:



You didn't even test before asking.

sorry, this plugin is here,made by bugsy http://forums.alliedmods.net/showthr...=121138&page=3
@2:i'm pretty sure i tested before every asking!


All times are GMT -4. The time now is 11:22.

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