Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- new string[300];
- format(string, sizeof(string), PointSauvegardes, pName);
- if(dialogid == 1)
- {
- if(response == 1)
- {
- if(strlen(inputtext) == 0)
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{Inscription}", "Veuillez choisir un mot de passe.", "Continuer", "Annuler");
- }
- else
- {
- dini_Create(string);
- dini_Set(string, "Mot de passe", inputtext);
- dini_IntSet(string, "Admin", 0);
- dini_IntSet(string, "Level", 0);
- dini_IntSet(string, "Cash", 1000);
- dini_IntSet(string, "Vitesse", 0);
- dini_IntSet(string, "Saut", 0);
- pInfo[playerid][pLogged] = 1;
- pInfo[playerid][pAdmin] = dini_Int(string, "Admin");
- pInfo[playerid][pLevel] = dini_Int(string, "Level");
- pInfo[playerid][pCash] = dini_Int(string, "Cash");
- pInfo[playerid][pVitesse] = dini_Int(string, "Vitesse");
- pInfo[playerid][pSaut] = dini_Int(string, "Saut");
- SetPlayerScore(playerid, pInfo[playerid][pLevel]);
- GivePlayerMoney(playerid, pInfo[playerid][pCash]);
- }
- }
- else
- {
- SendClientMessage(playerid, Blanc, "[Inscription] Vous avez décider d'annuler votre inscription. A bientôt.");
- Kick(playerid);
- }
- return 1;
- }
- if(dialogid == 2)
- {
- if(response == 1)
- {
- if(strlen(inputtext) == 0)
- {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{Connexion}", "Veuillez saisir votre mot de passe.", "Continuer", "Annuler");
- }
- else
- {
- new pw[450];
- pw = dini_Get(string, "Pass");
- if(strcmp(inputtext, pw) == 0)
- {
- pInfo[playerid][pLogged] = 1;
- pInfo[playerid][pAdmin] = dini_Int(string, "Admin");
- pInfo[playerid][pLevel] = dini_Int(string, "Level");
- pInfo[playerid][pCash] = dini_Int(string, "Cash");
- pInfo[playerid][pVitesse] = dini_Int(string, "Vitesse");
- pInfo[playerid][pSaut] = dini_Int(string, "Saut");
- SetPlayerScore(playerid, pInfo[playerid][pLevel]);
- GivePlayerMoney(playerid, pInfo[playerid][pCash]);
- }
- else
- {
- SendClientMessage(playerid, Rouge, "[ERREUR] Le mot de passe est incorrect !");
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{Connexion}", "Veuillez saisir votre mot de passe.", "Continuer", "Annuler");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, Blanc, "[Inscription] Vous avez décider d'annuler votre inscription. A bientôt.");
- Kick(playerid);
- }
- return 1;
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment