Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. #include <a_samp>
  2. #include <kolory>
  3. #include <dcmd>
  4. #include <dini>
  5.  
  6. #define DIALOGLOGIN 1
  7. #define DIALOGREGISTER 2
  8.  
  9. #define NAZWASERWERA "Polski Server Role-Play"
  10.  
  11. main() {}
  12.  
  13. public OnGameModeInit()
  14. {
  15. print(" ");
  16. print("*********Serwer Role-Play by MrByczek**********");
  17. print(" ");
  18. return 1;
  19. }
  20.  
  21. public OnPlayerSpawn(playerid)
  22. {
  23. return 1;
  24. }
  25.  
  26. public OnPlayerRequestClass(playerid, classid)
  27. {
  28. SpawnPlayer(playerid);
  29. new string[500];
  30. new Gname[MAX_PLAYER_NAME];
  31. GetPlayerName(playerid, Gname, sizeof(Gname));
  32. format(string, sizeof(string), "/Gracze/%s.ini,Gname");
  33. if(dini_Exists(string))
  34. {
  35. format(string, sizeof(string), "[FFFFFF]Witaj[FF0000] %s[FFFFFF] na naszym serverze PSRP!\nTwoje konto zostało pomyślnie odnazlezione.\nWpisz swoje haslo aby sie zalogowac., Gname");
  36. ShowPlayerDialog(playerid, DIALOGLOGIN, DIALOG_STYLE_PASSWORD, NAZWASERWERA,string,"Loguj","Wyjdz");
  37. }
  38. else
  39. {
  40. ShowPlayerDialog(playerid, DIALOGREGISTER, DIALOG_STYLE_PASSWORD, "NAZWASERWERA",string,"Rejestruj","Wyjdz");
  41. }
  42.  
  43. return 1;
  44. }
  45.  
  46. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  47. {
  48. if(dialogid == DIALOGREGISTER)
  49. {
  50. if(response)
  51. {
  52. if(strlen(inputtext))
  53. {
  54. if(strlen(inputtext) >= 5)
  55. {
  56. Register(playerid, inputtext);
  57. }
  58. }
  59. }
  60. return 1;
  61. }
  62. return 0;
  63. }
  64.  
  65. public OnPlayerRequestSpawn(playerid)
  66. {
  67. return 0;
  68. }
  69.  
  70. stock Register(playerid,haslo[])
  71. {
  72. new string[500];
  73. new Gname[MAX_PLAYER_NAME];
  74. GetPlayerName(playerid, Gname, sizeof(Gname));
  75. format(string, sizeof(string), "/Gracze/%s.ini,Gname");
  76. dini_Create(string);
  77. dini_Set(string, "Haslo", haslo);
  78. SendClientMessage(playerid, COLOR_CYAN, "Konto zostalo pomyslnie zalozone !");
  79. return 1;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement