AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Dictionary (https://forums.alliedmods.net/showthread.php?t=135382)

zirualas 08-15-2010 13:27

Dictionary
 
I try use a dictionary. I register_dictionary("name.txt")
Then I put name.txt file in data/lang and what i need to type int .sma file to he's print my text.
My name.txt file
PHP Code:

[en]
NAME_GRAVITY = !g[Name]!t#s Buy a gravity 


Arkshine 08-15-2010 13:33

Re: Dictionary
 
You have to use %L while formating your text.

Example :

- client_print( id, print_chat, "%L", id, "NAME_GRAVITY" );
- client_print( 0, print_chat, "%L", LANG_PLAYER, "NAME_GRAVITY" );

Use the player's index or if 0 ( for all players ), use LANG_PLAYER.

zirualas 08-15-2010 13:36

Re: Dictionary
 
what's diffirence of this codes.
PHP Code:

client_printidprint_chat"%L"id"NAME_GRAVITY" );
client_print0print_chat"%L"LANG_PLAYER"NAME_GRAVITY" ); 

-EDIT-
But he's print me only orange text, I wanna colored text :)

Arkshine 08-15-2010 14:14

Re: Dictionary
 
There is a tutorial. Please search.

zirualas 08-16-2010 01:40

Re: Dictionary
 
I try to search this TUT, can't find it.

ot_207 08-16-2010 05:19

Re: Dictionary
 
Quote:

Originally Posted by zirualas (Post 1272296)
I try to search this TUT, can't find it.

If the search button isn't good for you try going in the thread of sniplets and tuts. There are only 11 pages. Just read the titles and you will find it.

zirualas 08-16-2010 06:29

Re: Dictionary
 
I can't find it!

Arkshine 08-16-2010 06:36

Re: Dictionary
 
Tip : Color chat

zirualas 08-16-2010 06:45

Re: Dictionary
 
1 Attachment(s)
ScreenShot, no tutorial...
http://forums.alliedmods.net/attachm...1&d=1281955485

Arkshine 08-16-2010 06:49

Re: Dictionary
 
Quote:

ScreenShot, no tutorial...
It's what you need. :roll:


All times are GMT -4. The time now is 21:54.

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