SA-MP Forums Archive
Help in a Format - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help in a Format (/showthread.php?tid=534836)



Help in a Format - JonathanW - 31.08.2014

G'day everyone. Let's get to the problem, shall we?
I was scripting a Birth Date system but went into a problem.
How to use the '19/09/1990' (DAY/MONTH/YEAR) in a Dialog?
I want to use it in a Single Dialog. Please help.


Re: Help in a Format - SickAttack - 31.08.2014

Example:
pawn Код:
new string[144], year = 2014, month = 6, day = 16;
format(string, sizeof(string), "%d/%d/%d", day, month, year);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Birthdays:", string, "Close", "");



Re: Help in a Format - JonathanW - 01.09.2014

Quote:
Originally Posted by ******
Посмотреть сообщение
I would use "%02d/%02d/%04d", since he said "09" and just using "%d" would produce just "9" for September.
This ^^
Repped, even though you don't need it XD