DjoLe11

Untitled

Jul 28th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. if(dialogid == DIALOG_REGISTER)
  2. {
  3. if(!response) return KickIgraca(playerid);
  4. if(response)
  5. {
  6. if(strlen(inputtext) < 3 || strlen(inputtext) > 15)
  7. {
  8. SPD(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration on Riverdale DeathMatch "," The code must be longer than 3 letters or less than 15 letters!\nType in the password to register.", "Continue", "Exit" );
  9. return 1;
  10. }
  11. ResetVarijabli(playerid);
  12. gLoggedCheck[playerid] = 1;
  13. PlayerInfo[playerid][pSifra] = udb_hash( inputtext );
  14. new INI:File = INI_Open( UserPath( playerid ) );
  15. INI_SetTag(File, "data" );
  16. INI_WriteInt(File, "lozinka", udb_hash( inputtext ) );
  17. INI_WriteInt(File, "Admin", PlayerInfo[playerid][pAdmin] );
  18. INI_WriteInt(File, "Novac", PlayerInfo[playerid][pNovac] );
  19. INI_WriteInt(File, "Skor", PlayerInfo[playerid][pSkor] );
  20. INI_WriteInt(File, "Ubistva", PlayerInfo[playerid][pUbistva] );
  21. INI_WriteInt(File, "Smrti", PlayerInfo[playerid][pSmrti] );
  22. INI_WriteInt(File, "Skin", 45 );
  23. INI_Close( File );
  24. InDM[playerid] = 0;
  25. SetPlayerHealth(playerid, 100);
  26. SetPlayerArmour(playerid, 100);
  27. SetPlayerInterior(playerid, 18);
  28. TogglePlayerSpectating(playerid, false);
  29. SetSpawnInfo(playerid,45,24,1727.2626,-1667.0796,22.0867,0,0,0,0,0,0,0);
  30. SpawnPlayer(playerid);
  31. }
  32. return 1;
  33. }
  34. if(dialogid == DIALOG_LOGIN)
  35. {
  36. if(!response) return KickIgraca(playerid);
  37. if(response)
  38. {
  39. if(udb_hash(inputtext) == PlayerInfo[playerid][pSifra])
  40. {
  41. TogglePlayerSpectating(playerid,false);
  42. GivePlayerMoney(playerid, PlayerInfo[playerid][pNovac]);
  43. SetPlayerScore(playerid, PlayerInfo[playerid][pSkor]);
  44. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  45. gLoggedCheck[playerid] = 1;
  46. SetSpawnInfo(playerid,45,PlayerInfo[playerid][pSkin],1727.2626,-1667.0796,22.0867,0,0,0,0,0,0,0);
  47. SetPlayerInterior(playerid, 18);
  48. InDM[playerid] = 0;
  49. SetPlayerHealth(playerid, 100);
  50. SetPlayerArmour(playerid, 100);
  51. ResetPlayerWeapons(playerid);
  52. SpawnPlayer(playerid);
  53. ResetUbistvaSmrti(playerid);
  54. nekickaj[playerid] = 1;
  55. KillTimer(g_LoginTimer[playerid]);
  56.  
  57.  
  58. }
  59. else
  60. {
  61. SCM(playerid, -1, ""SRWPLAVA"[R:DM] "BELA"Invalid password, you are kicked from the server!");
  62. }
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment