Raised This Month: $ Target: $400
 0% 

2 options in client_print


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 01-02-2011 , 17:23   2 options in client_print
Reply With Quote #1

Hey, how could I make that there will be 2 options available, like:

if 3 - iRound = 1, then it says round, otherwise rounds...

here is my code:

PHP Code:
client_print(idprint_chat"You can use this only after %d round%s"iRound"s" " "
EDIT: doh :S I searched and found answer.
Quote:
3 - iRound > 1 ? "s":""
ALSO one more question, to not create new topic I will write it here,

What is the difference between %i and %d, and which one should I use if I'm trying to print player money etc.

Last edited by reinert; 01-02-2011 at 17:32.
reinert is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 01-02-2011 , 19:24   Re: 2 options in client_print
Reply With Quote #2

Both %i and %d are for integers(1234), I use %i myself.

Quote:
Originally Posted by DarkGod View Post
%d and %i for integers, %f for floats, %s for strings, %c for char, %a for arrays, %L for lang.

Not sure when you should use %a, though, or how it appears.
vL. is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 01-03-2011 , 14:09   Re: 2 options in client_print
Reply With Quote #3

%a is used (around amxx 1.8 I think ? ) for string returned by the method ArrayGetStringHandle.
SpeeDeeR is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 01-03-2011 , 14:20   Re: 2 options in client_print
Reply With Quote #4

I've got one more question, how could I save text into array ???

copy() ???

and then how to print it ?
reinert is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-03-2011 , 14:25   Re: 2 options in client_print
Reply With Quote #5

Quote:
Originally Posted by reinert View Post
I've got one more question, how could I save text into array ???

copy() ???

and then how to print it ?
You will need to be more specific. It really depends on what you are doing exactly. copy() will work in some situations but format() or formatex() may be better depending on your situation.

Just test it out. Use the funcwiki.
__________________
fysiks 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 01:24.


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