Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. CMD:atsakiklis(playerid)
  2. {
  3. if(PlayerDB[playerid][PhoneState] == 0)
  4. {
  5. ErrorMsg(playerid,"* Pirmiausia įjunkite savo telefoną /ijungti.");
  6. return 1;
  7. }
  8. else
  9. {
  10. new QueryString[400];
  11. mysql_format(connectionHandle, QueryString, 400, "SELECT `SenderName`, `SendingTime`, `Zinute` FROM `smszinutes` WHERE `ReceiverName` = '%e' ORDER BY `ID` DESC LIMIT 10;", Vardas(playerid));
  12. mysql_tquery(connectionHandle, QueryString, "OnSelectSMSZinutes", "d", playerid);
  13. }
  14. return 1;
  15. }
  16. forward OnSelectSMSZinutes(playerid);
  17. public OnSelectSMSZinutes(playerid)
  18. {
  19. if(cache_get_row_count() == 0)
  20. {
  21. ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_LIST, "Atsakiklis", "Žinučių nėra", "Gerai", "");
  22. }
  23. else
  24. {
  25. new SenderName[24];
  26. new SendingTime[50];
  27. new Zinute[444];
  28. new info[2048];
  29. new string[850];
  30.  
  31. for(new i = 0; i < cache_get_row_count(); i++)
  32. {
  33. cache_get_row(i, 0, SenderName);
  34. cache_get_row(i, 1, SendingTime);
  35. cache_get_row(i, 2, Zinute);
  36.  
  37. if(i == 0) format(string, 256, "[%s] %s: %s", SendingTime,SenderName,Zinute);
  38. else format(string, 256, "\n[%s] %s: %s", SendingTime,SenderName,Zinute);
  39. SendSplitMessage
  40. strcat(info, string);
  41. }
  42. ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_LIST, "{AFAFAF}Pokalbių išrašas 1", info, "Gerai", "");
  43. }
  44. return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement