Advertisement
Guest User

Untitled

a guest
Nov 8th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.31 KB | None | 0 0
  1. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2. {
  3.     new pName[MAX_PLAYER_NAME];
  4.     GetPlayerName(playerid, pName, sizeof(pName));
  5.     new path[100];
  6.     format(path, sizeof(path), save, pName);
  7.     new pw = dini_Int(path, "MotDePasse");
  8.     switch(dialogid)
  9.     {
  10.         case DIALOG_LOGIN:
  11.         {
  12.             if(response)
  13.             {
  14.                 if(inputtext[pw] == pw)//C'est ici que ça foire ! :'(
  15.                 {
  16.                     SetPlayerSkin(playerid, dini_Int(path, "Skin"));
  17.                 GivePlayerMoney(playerid, dini_Int(path, "Argent"));
  18.                 dini_IntSet(path, "Admin",dini_Int(path, "Admin"));
  19.                 dini_IntSet(path, "Modo",dini_Int(path, "Modo"));
  20.                 }
  21.                 else
  22.                 {
  23.                 Kick(playerid);
  24.                 }
  25.             }
  26.             else
  27.             {
  28.                 Kick(playerid);
  29.             }
  30.                 return 0;
  31.         }
  32.         case DIALOG_REGISTER:
  33.         {
  34.             if(!response)
  35.             {
  36.                 Kick(playerid);
  37.             }
  38.             else
  39.             {
  40.                 dini_Create(path);
  41.                 pInfo[playerid][MotDePasse] = dini_Set(path, "MotDePasse", inputtext);
  42.                     pInfo[playerid][Admin] = dini_IntSet(path, "Admin", 0);
  43.                     pInfo[playerid][Modo] = dini_IntSet(path, "Modo", 0);
  44.                     pInfo[playerid][Argent] = dini_IntSet(path, "Argent", 10000);
  45.                     pInfo[playerid][Skin] = dini_IntSet(path, "Skin", 0);
  46.             }
  47.         }
  48.     }
  49. return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement