Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- new path[100];
- format(path, sizeof(path), save, pName);
- new pw = dini_Int(path, "MotDePasse");
- switch(dialogid)
- {
- case DIALOG_LOGIN:
- {
- if(response)
- {
- if(inputtext[pw] == pw)//C'est ici que ça foire ! :'(
- {
- SetPlayerSkin(playerid, dini_Int(path, "Skin"));
- GivePlayerMoney(playerid, dini_Int(path, "Argent"));
- dini_IntSet(path, "Admin",dini_Int(path, "Admin"));
- dini_IntSet(path, "Modo",dini_Int(path, "Modo"));
- }
- else
- {
- Kick(playerid);
- }
- }
- else
- {
- Kick(playerid);
- }
- return 0;
- }
- case DIALOG_REGISTER:
- {
- if(!response)
- {
- Kick(playerid);
- }
- else
- {
- dini_Create(path);
- pInfo[playerid][MotDePasse] = dini_Set(path, "MotDePasse", inputtext);
- pInfo[playerid][Admin] = dini_IntSet(path, "Admin", 0);
- pInfo[playerid][Modo] = dini_IntSet(path, "Modo", 0);
- pInfo[playerid][Argent] = dini_IntSet(path, "Argent", 10000);
- pInfo[playerid][Skin] = dini_IntSet(path, "Skin", 0);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement