Raised This Month: $12 Target: $400
 3% 

Dictionary


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pepe.argento
Member
Join Date: Jul 2008
Old 07-29-2008 , 12:54   Dictionary
Reply With Quote #1

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
__________________
Sry for my bad inglish ... I Tandil (argentina)
Pepe.argento is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-29-2008 , 12:58   Re: Dictionary
Reply With Quote #2

Code:
    public plugin_init()     {         register_dictionary ( "MyDictionary.txt" );     }         public MyFunction( id )     {         client_print( id, print_chat, "%L", id, "TEXT" );     }
__________________
Arkshine is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 07-29-2008 , 12:59   Re: Dictionary
Reply With Quote #3

Why not use a motd?
http://www.amxmodx.org/funcwiki.php?...motd&go=search
__________________
minimiller is offline
Send a message via MSN to minimiller
Dr. Jan Itor
Veteran Member
Join Date: Mar 2008
Location: there.
Old 07-29-2008 , 13:06   Re: Dictionary
Reply With Quote #4

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
__________________
Dr. Jan Itor is offline
Pepe.argento
Member
Join Date: Jul 2008
Old 07-29-2008 , 13:26   Re: Dictionary
Reply With Quote #5

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?
__________________
Sry for my bad inglish ... I Tandil (argentina)

Last edited by Pepe.argento; 07-29-2008 at 13:28.
Pepe.argento is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 07-29-2008 , 13:57   Re: Dictionary
Reply With Quote #6

Quote:
Originally Posted by Pepe.argento View Post
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 View Post
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?
__________________
minimiller is offline
Send a message via MSN to minimiller
Dr. Jan Itor
Veteran Member
Join Date: Mar 2008
Location: there.
Old 07-29-2008 , 14:57   Re: Dictionary
Reply With Quote #7

Quote:
Originally Posted by minimiller View Post
Where does it say when he throws a he?
didn't say that it was an example
__________________
Dr. Jan Itor is offline
Drogocop
Member
Join Date: Jul 2008
Location: Argentina
Old 07-29-2008 , 15:11   Re: Dictionary
Reply With Quote #8

Quote:
Originally Posted by Pepe.argento View Post
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
__________________
Drogocop is offline
Send a message via MSN to Drogocop
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-29-2008 , 15:28   Re: Dictionary
Reply With Quote #9

should be "quit.txt". I think .txt is required.
__________________
Arkshine is offline
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:11.


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