daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2. {
  3.    
  4.    
  5.     switch(dialogid)
  6.     {
  7.         case DIALOG_LOGIN:
  8.         {
  9.             #pragma tabsize 0
  10.                      TogglePlayerSpectating(playerid, 1);
  11.                      InterpolateCameraPos(playerid, 1494.749877, -1715.429809, 15.321800, 1510.866088, -1718.042114, 16.046100, 3000, 1);
  12.                       InterpolateCameraLookAt(playerid, 1495.684814, -1715.078369, 15.271821, 1513.923583, -1715.473999, 16.283460, 3000, 1);
  13.             if(!response) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FFFFFF}Welcome back to Play-Sa\n\n{FF0066}Type your password below to login to your game account", "Login", "Quit");
  14.             else if(response)
  15.             {
  16.                 new hashpass[129],query[280];
  17.                 WP_Hash(hashpass, sizeof(hashpass), inputtext);
  18.                 if(!strcmp(hashpass, Info[playerid][Password], false))
  19.                 {
  20.                     mysql_format(mysql, query, sizeof(query), "SELECT * FROM `playersdata` WHERE `PlayerName` = '%e' LIMIT 1", GetName(playerid));
  21.                     mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
  22.                 }
  23.                 else
  24.                 {
  25.                     attempts[playerid]++;
  26.                     if(attempts[playerid] == 3)
  27.                     {
  28.                         format(query, sizeof(query), "%s has been kicked for 3 failed login attempts", GetName(playerid));
  29.                         SendClientMessageToAll(red, query);
  30.                         DelayKick(playerid);
  31.                         return 0;
  32.                     }
  33.                     else
  34.                     {
  35.                         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FF0000}You have entered an incorrect password\n\n{FFFFFF}Type your password below to login", "Login", "Quit");
  36.                     }
  37.                 }
  38.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top