20.07.2015, 17:09
Код:
new longDialog[3000], date[3]; new name[MAX_PLAYER_NAME], tempstr[MAX_PLAYER_NAME / 2]; GetPlayerName(playerid, name, sizeof(name)); new loc = strfind(name, "_", true); strmid(tempstr, name, loc, strlen(name)); strdel(name, loc, strlen(name)); strdel(tempstr, 0, 1); getdate(date[2], date[1], date[0]); format(PlayerData[playerid][pPassportNr], 10, "LS%d", random(9999999)); format(PlayerData[playerid][pPassportID], 24, "%02d/%02d/%d", date[0], date[1], date[2]); format(PlayerData[playerid][pPassportED], 24, "%02d/%02d/%d", date[0], date[1], date[2]+2); strcat(longDialog, "{408080}PERSONAS DATI/PERSONAL INFO{C9C9C9}\n", sizeof(longDialog)); format(longDialog, sizeof(longDialog), "{408080}Uzvārds/Surname:\n%s\n", tempstr); format(longDialog, sizeof(longDialog), "%sVārds/Given name:\n%s\n", name); format(longDialog, sizeof(longDialog), "%sIzcelsme/Origin:\n%s\n", PlayerData[playerid][pOrigin]); format(longDialog, sizeof(longDialog), "%sDzimљanas datums/Date of birth:\n%s\n", PlayerData[playerid][pBirthdate]); format(longDialog, sizeof(longDialog), "%sDzimums/Gender:\n%s\n\n", GetPlayerGender(playerid)); strcat(longDialog, "%s{408080}PASES DATI/PASSPORT INFO{C9C9C9}\n", sizeof(longDialog)); format(longDialog, sizeof(longDialog), "%sPases Nr./Passport No.:\n%s\n", PlayerData[playerid][pPassportNr]); format(longDialog, sizeof(longDialog), "%sIzdoљanas datums/Date of issue:\n%s\n", PlayerData[playerid][pPassportID]); format(longDialog, sizeof(longDialog), "%sDerīga līdz/Date of expiry:\n%s", PlayerData[playerid][pPassportED]); ShowDialog(playerid, passportAccept, DIALOG_STYLE_MSGBOX, "Pase/Passport \"KOPIA\"", longDialog, "Apstipr.", "Atcelt");