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=75036)

Pepe.argento 07-29-2008 12:54

Dictionary
 
How do I add a dictionary to client_print (or message of chat) ?
so that the plugin, use a text of the folder lang.

Xample:
client_print( id, print_chat, "TEXT" )

and where it says "TEXT", it says the text of the file .txt of the folder lang.

Thanks

Arkshine 07-29-2008 12:58

Re: Dictionary
 
Code:
    public plugin_init()     {         register_dictionary ( "MyDictionary.txt" );     }         public MyFunction( id )     {         client_print( id, print_chat, "%L", id, "TEXT" );     }

minimiller 07-29-2008 12:59

Re: Dictionary
 
Why not use a motd?
http://www.amxmodx.org/funcwiki.php?...motd&go=search

Dr. Jan Itor 07-29-2008 13:06

Re: Dictionary
 
use a motd? why would u use a motd like if u want messages to come up when u throw he thats great show motd every time.. motd is only good in such things as /help

Pepe.argento 07-29-2008 13:26

Re: Dictionary
 
Xample of code:
PHP Code:

    public plugin_init()
    {
        
register_dictionary "quit" );
        
register_clcmd("say /exit""quit");
    }
    
    public 
quit id )
    {
    
ColorChat(id,GRAY, ( idprint_chat"%L"id"CLIENTQUIT" );
    } 

Xample of quit.txt

Quote:

[EN]
CLIENTQUIT = Pepe Dissconnect
So this good?

minimiller 07-29-2008 13:57

Re: Dictionary
 
Quote:

Originally Posted by Pepe.argento (Post 661024)
How do I add a dictionary to client_print (or message of chat) ?
so that the plugin, use a text of the folder lang.

Xample:
client_print( id, print_chat, "TEXT" )

and where it says "TEXT", it says the text of the file .txt of the folder lang.

Thanks

Quote:

Originally Posted by Dr. Jan Itor (Post 661031)
use a motd? why would u use a motd like if u want messages to come up when u throw he thats great show motd every time.. motd is only good in such things as /help


Where does it say when he throws a he?

Dr. Jan Itor 07-29-2008 14:57

Re: Dictionary
 
Quote:

Originally Posted by minimiller (Post 661064)
Where does it say when he throws a he?

didn't say that it was an example

Drogocop 07-29-2008 15:11

Re: Dictionary
 
Quote:

Originally Posted by Pepe.argento (Post 661047)
Xample of code:
PHP Code:

    public plugin_init()
    {
        
register_dictionary "quit" );
        
register_clcmd("say /exit""quit");
    }
    
    public 
quit id )
    {
    
ColorChat(id,GRAY, ( idprint_chat"%L"id"CLIENTQUIT" );
    } 

Xample of quit.txt

So this good?

Yes... So this perfect :up:

Arkshine 07-29-2008 15:28

Re: Dictionary
 
should be "quit.txt". I think .txt is required.


All times are GMT -4. The time now is 05:33.

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