Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:atsakiklis(playerid)
- {
- if(PlayerDB[playerid][PhoneState] == 0)
- {
- ErrorMsg(playerid,"* Pirmiausia įjunkite savo telefoną /ijungti.");
- return 1;
- }
- else
- {
- new QueryString[400];
- mysql_format(connectionHandle, QueryString, 400, "SELECT `SenderName`, `SendingTime`, `Zinute` FROM `smszinutes` WHERE `ReceiverName` = '%e' ORDER BY `ID` DESC LIMIT 10;", Vardas(playerid));
- mysql_tquery(connectionHandle, QueryString, "OnSelectSMSZinutes", "d", playerid);
- }
- return 1;
- }
- forward OnSelectSMSZinutes(playerid);
- public OnSelectSMSZinutes(playerid)
- {
- if(cache_get_row_count() == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_LIST, "Atsakiklis", "Žinučių nėra", "Gerai", "");
- }
- else
- {
- new SenderName[24];
- new SendingTime[50];
- new Zinute[444];
- new info[2048];
- new string[850];
- for(new i = 0; i < cache_get_row_count(); i++)
- {
- cache_get_row(i, 0, SenderName);
- cache_get_row(i, 1, SendingTime);
- cache_get_row(i, 2, Zinute);
- if(i == 0) format(string, 256, "[%s] %s: %s", SendingTime,SenderName,Zinute);
- else format(string, 256, "\n[%s] %s: %s", SendingTime,SenderName,Zinute);
- SendSplitMessage
- strcat(info, string);
- }
- ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_LIST, "{AFAFAF}Pokalbių išrašas 1", info, "Gerai", "");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement