14.02.2019, 18:01
Quote:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new updates = GetPVarInt(playerid, "UID"); if(dialogid == DIALOG_UPDATE) { if(response) { if(isnull(inputtext)) return ShowPlayerDialog(playerid, DIALOG_UPDATE, DIALOG_STYLE_INPUT, "adding update", "please write your update below", "Add", "Cancel"); for(new x=1 ; x<560 ; x++) { new s[256]; format(s, sizeof(s), "update%d", x); if(!dini_Isset("updates.ini", s)) { new year, month, day; getdate(year, month, day); new utext[1024]; format(utext, sizeof(utext), "%d/%d/%d", day, month, year); format(s, sizeof(s), "date%d", x); dini_Set("updates.ini", s, utext); format(utext, sizeof(utext), "%s", inputtext); format(s, sizeof(s), "update%d", x); dini_Set("updates.ini", s, utext); new dd = dini_Int("updates.ini", "MAX"); dini_IntSet("updates.ini", "MAX", dd+1); format(s, sizeof(s), "Added update id %d. Your Update: '%s', and Date: %d/%d/%d.", x, inputtext, day, month, year); SendClientMessage(playerid, COLOR_YELLOW, s); break; } } return 1; } return 1; |
Quote:
if(!dini_Isset("updates.ini", s)) |