print_chat commands
Hello i am making a plugin and in one tutorial i found commands like ^n, %i etc. I know what means ^n, but i don't know others could anyone make a list of these and say how to use them and what is they for? Thanks in advace :)
|
Re: print_chat commands
Please anyone feel free to correct me, but I believe:
Some Examples: %f = Float value = 0.000000 %.2f = 0.00 %.3f = 0.000 %s = String = "Wuzzup!" %i = Integer = 4 %d = Data (I think this can be used universally, should show string/integer/floats) -------------------- Usually you use these when formatting some type of string, as in for a message related to usually health, name, steamid, and other generated information. Say you want to display the client id and steamid of a user, you would need to do... Code:
|
Re: print_chat commands
Thanks :) just as i wanted :) theres left one question. Where you writed
Quote:
|
Re: print_chat commands
In order, the first %i is represented by the first variable after the "", in this case, ID...The second is represented by the second variable, in this case S...And so on :)
As far as I know, %d = %i = integer ( not sure about that ) also, for client_print you can use PHP Code:
^n = new line ^t = TAB spacing Now if I'm right, in Pawn you can use the characters from c++ language like Code:
\n newlineCode:
^n newlinePHP Code:
|
Re: print_chat commands
I tried to make
Code:
new menu= menu_create("Choose where to spend points. You currently have %i points", "pts_handler", playerpts[id]) |
Re: print_chat commands
Quote:
http://www.amxmodx.org/funcwiki.php?go=func&id=798 Code:
Link to format http://www.amxmodx.org/funcwiki.php?go=func&id=49 Code:
Ahh, see unforunately you cannot use that function "menu_create" to format a string. So you would have to do something like.. Code:
Hope this helps! |
Re: print_chat commands
And again mysticssjgoku4 saves the day! :D Thank you very much :)
|
Re: print_chat commands
np =)
|
| All times are GMT -4. The time now is 05:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.