Problem: zanima me kako code koji cu vam postati, mogu prebaciti u sscanf? znaci da mi odvoji brojeve...kad bih upisao godinu rodjenja...19/08/1990...
Skripta:
new year, month,day;
getdate(year, month, day);
new DateInfo;
split(text, DateInfo, '/');
if(year - strvalEx(DateInfo) > 100 || strvalEx(DateInfo) < 1 || strvalEx(DateInfo) >= year)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Birthdate? (Use dd/mm/yyyy)");
return 0;
}
new check = year - strvalEx(DateInfo);
if(check == year)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Birthdate? (Use dd/mm/yyyy)");
return 0;
}
if(strvalEx(DateInfo) > month)
{
check -= 1;
}
else if(strvalEx(DateInfo) == month && strval(DateInfo) > day)
{
check -= 1;
}
PI = check;
format(string, sizeof(string), "Ok, so you are %d year old.",PI);
SendClientMessage(playerid, COLOR_YELLOW2, string);
RegistrationStep = 3;
SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Origin? (Type in: USA, Europe, Asia or Africa)");
return 0;Slike/Video: //
EDIT: zaboravih reci da ce to bit u dialogu...
Hvala unaprijed!
