Raised This Month: $ Target: $400
 0% 

%L, %s, %d


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 05-26-2013 , 05:18   %L, %s, %d
Reply With Quote #1

Where can i read about these things? When which should be used?
GhostMan is offline
MPD
Member
Join Date: May 2013
Location: Lithuania
Old 05-26-2013 , 05:29   Re: %L, %s, %d
Reply With Quote #2

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)
MPD is offline
Send a message via Skype™ to MPD
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-26-2013 , 05:38   Re: %L, %s, %d
Reply With Quote #3

%L is lang?
.Dare Devil. is offline
GhostMan
Senior Member
Join Date: Jun 2012
Old 05-26-2013 , 05:55   Re: %L, %s, %d
Reply With Quote #4

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)

Last edited by GhostMan; 05-26-2013 at 05:56.
GhostMan is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-26-2013 , 06:45   Re: %L, %s, %d
Reply With Quote #5

%d or %i for integer value.
%f for float value.
%s for string array.
%L for language file reference.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-28-2013 , 00:21   Re: %L, %s, %d
Reply With Quote #6

Quote:
Originally Posted by GhostMan View Post
Althouth it works like this too
Code:
client_print(id, print_chat, "%d Some text goes here.", pref)
No.
__________________
fysiks is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-26-2013 , 07:20   Re: %L, %s, %d
Reply With Quote #7

%c for character
%x, %X for hexa value
%u for unsigned integer value
%a for pointer to cell string (ArrayGetStringHandle)
__________________
Arkshine is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 05-28-2013 , 15:58   Re: %L, %s, %d
Reply With Quote #8

http://www.cplusplus.com/reference/cstdio/fprintf/

Note that not all parameters/formats are supported in AMXX.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Old 07-30-2014, 10:56
Engfr546
This message has been deleted by hornet. Reason: Unnecessary thread revival
Old 07-30-2014, 11:20
HamletEagle
This message has been deleted by hornet. Reason: Unnecessary thread revival
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 16:23.


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