AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   %L, %s, %d (https://forums.alliedmods.net/showthread.php?t=216827)

GhostMan 05-26-2013 05:18

%L, %s, %d
 
Where can i read about these things? When which should be used?

MPD 05-26-2013 05:29

Re: %L, %s, %d
 
Well, i know that %s is used for strings, %d for integers, but I don't know what for is %L.
I found something about it here: http://wiki.amxmodx.org/Advanced_Scripting_(AMX_Mod_X)

.Dare Devil. 05-26-2013 05:38

Re: %L, %s, %d
 
%L is lang?

GhostMan 05-26-2013 05:55

Re: %L, %s, %d
 
So doing something like this would be correct?

Code:

new const pref[] = "[AMXX]"
new g_num

plugin_init()
{
    g_num = register_cvar("amx_num",    "1")
}

client_print(id, print_chat, "%s Some text goes here.", pref)
client_print(id, print_chat, "%s amx_num has value %d", pref, get_pcvar_num(g_num))

Althouth it works like this too
Code:

client_print(id, print_chat, "%d Some text goes here.", pref)

hornet 05-26-2013 06:45

Re: %L, %s, %d
 
%d or %i for integer value.
%f for float value.
%s for string array.
%L for language file reference.

Arkshine 05-26-2013 07:20

Re: %L, %s, %d
 
%c for character
%x, %X for hexa value
%u for unsigned integer value
%a for pointer to cell string (ArrayGetStringHandle)

fysiks 05-28-2013 00:21

Re: %L, %s, %d
 
Quote:

Originally Posted by GhostMan (Post 1958636)
Althouth it works like this too
Code:

client_print(id, print_chat, "%d Some text goes here.", pref)

No.

Emp` 05-28-2013 15:58

Re: %L, %s, %d
 
http://www.cplusplus.com/reference/cstdio/fprintf/

Note that not all parameters/formats are supported in AMXX.


All times are GMT -4. The time now is 16:23.

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