Guest User

Untitled

a guest
Nov 15th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2. {
  3. switch(dialogid)
  4. {
  5. case DIALOG_REGISTER:
  6. {
  7. if(!response) return Kick(playerid);
  8. if(response)
  9. {
  10. if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"{FF0000][AMAZING GAMING] {FFFFFF}Register","{FF0000}[AG] {FFFFFF}Predugacka sifra","Register","Quit");
  11. new INI:File = INI_Open(UserPath(playerid));
  12. INI_SetTag(File,"data");
  13. INI_WriteInt(File,"Password",udb_hash(inputtext));
  14. INI_WriteInt(File,"Cash",0);
  15. INI_WriteInt(File,"Admin",0);
  16. INI_WriteInt(File,"Score",0);
  17. INI_WriteInt(File,"Bankmoney",0);
  18. INI_WriteInt(File,"Banned",0);
  19. INI_WriteInt(File,"VIP",0);
  20. INI_WriteInt(File,"Promoter",0);
  21. INI_WriteInt(File,"Skin",0);
  22. INI_WriteInt(File,"DJ",0);
  23. INI_WriteInt(File,"Pasos",0);
  24. INI_WriteInt(File,"ZK",0);
  25. INI_WriteInt(File,"GSF",0);
  26. INI_WriteInt(File,"Varios",0);
  27. INI_WriteInt(File,"Ballas",0);
  28. INI_WriteInt(File,"GM",0);
  29. INI_WriteInt(File,"FBI",0);
  30. INI_WriteInt(File,"Zlato",0);
  31. INI_Close(File);
  32. UlogovanProverava[playerid] = 1;
  33. PlayerInfo[playerid][pAdmin] = 0;
  34. PlayerInfo[playerid][pZlato] = 0;
  35. PlayerInfo[playerid][pDJ] = 0;
  36. PlayerInfo[playerid][pPromoter] = 0;
  37. PlayerInfo[playerid][pZK] = 0;
  38. PlayerInfo[playerid][pVip] = 0;
  39. PlayerInfo[playerid][pBallas] = 0;
  40. PlayerInfo[playerid][pVarios] = 0;
  41. PlayerInfo[playerid][pGSF] = 0;
  42. PlayerInfo[playerid][pGM] = 0;
  43. PlayerInfo[playerid][pFBI] = 0;
  44. }
  45. }
  46. case DIALOG_LOGIN:
  47. {
  48. if(!response) return Kick(playerid);
  49. if(response)
  50. {
  51. if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  52. {
  53. INI_ParseFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);
  54. GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
  55. SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
  56. UlogovanProverava[playerid] = 1;
  57. SendClientMessage(playerid,-1,"{FF0000}[AG] {FFFFFF}Uspesno si se ulogovao");
  58. }
  59. else
  60. {
  61. ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"{FF0000}[AMAZING GAMING] {FFFFFF}Login","{FF0000}[AG] {FFFFFF}Pogresna sifra","Login","Quit");
  62. }
  63. }
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment