SA-MP Forums Archive
Date input - 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: Date input (/showthread.php?tid=566611)



Date input - Banditukas - 07.03.2015

How to check if player string is date format (2015-03-07 YYYY-MM-DD) ? and too i want to do if player write number with 0 like 01 | 02 | 03 ... Replace that and make only 1 2 3


Re: Date input - Banditukas - 07.03.2015

You mean

if( Year > 9 )
{
// bad
}
if( Year < 1 )
{
// bad
}

Like this?


Re: Date input - Banditukas - 07.03.2015

new Years,Month,Day;

Код:
if(sscanf(params, "p<->ddd", Years,Month,Day ))
{
   // Player write just command without parameters i can check it here?
   return 1;
}