AlliedModders

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

Lure.d 01-01-2010 14:05

2 problems
 
1:

I made a function to print players name, but seem not to work...
Code:

public ETCmsg() {
    client_print(0, print_chat, "%d has joined the server", LANG_PLAYER);
}

And when it comes to writing the etcmsg it kicks me outta server and post following in console:

Quote:

Host_Error: WriteDest_Parm: not a clien
How to make it write:
Playername has joined the server.

2:

Multi languaging...
Code:

client_print(0, print_chat, "%L is nice.", "MSG_CAR");
Thats just ex, but it doesnt print anything, just writes
Quote:

MSG_CAR is nice.
I have added
Quote:

register_dictionary("testml.txt");
In it i wrote
Quote:

[en]
MSG_CAR = Ferrari
Still doesnt print a thing except MSG_CAR is nice...

So help will be appreciated very much.

Bugsy 01-01-2010 14:13

Re: 2 problems
 
Try searching
PHP Code:

public client_putinserverid )
{
    new 
szName33 ];
    
get_user_nameid szName charsmaxszName ) );
    
client_printprint_chat "* %s as joined the server" szName );



draft 01-01-2010 14:13

Re: 2 problems
 
Code:

client_putinserver(id)
{
static name[30]
get_user_name(id, name, 29)
client_print(0, print_chat, "%s has joined the server!", name)
}


Lure.d 01-01-2010 14:15

Re: 2 problems
 
sweet, ill try them, never thought about get_user_name :o

Bugsy 01-01-2010 14:27

Re: 2 problems
 
2.
PHP Code:

public plugin_init()
{

     
register_dictionary"MyDictionary.txt" );
}
    
public 
client_putinserverid )
{
     new 
szName33 ];
     
get_user_nameid szName charsmaxszName ) );
     
client_print"%L" LANG_PLAYER "MSG_CAR" szName );


MyDictionary.txt
Code:

[en]
MSG_CAR=%s drives a Ferrari


Lure.d 01-01-2010 15:08

Re: 2 problems
 
CLOSED.


All times are GMT -4. The time now is 04:07.

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