29.12.2014, 11:04
hey everybody i have a problem i make a date checker but i have a problem i wrote the script like this
then if i type the command in the game the command doesnt work
that script for check the older date(old date) with current date(now)
help plss
sorry for my bad english
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/test", cmdtext, true, 10) == 0)
{
new date1;
new Year, Month, Day;
new date2;
date1 = 29/12/2014;
date2 = getdate(Year, Month, Day);
printf("%02d/%02d/%d", Day, Month, Year);
if(date2 == date1) //then is date1 older .
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You connected to the server", "Close", "");
return 1;
}
return 0;
}
that script for check the older date(old date) with current date(now)
help plss
sorry for my bad english

