Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return SPD(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""COLOR_BELA"Registracja...",""COLOR_CRVENA"Ukucali ste neispravnu sifru.\n"COLOR_BELA"Ukucajte novu sifru da se registrujete.","Register","Izlaz");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"Data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"Score",0);
- INI_WriteInt(File,"Bounty",0);
- INI_Close(File);
- SpawnPlayer(playerid);
- }
- }
- case DIALOG_LOGIN:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_Data", .bExtra = true, .extra = playerid);
- GPM(playerid, PlayerInfo[playerid][pCash]);
- }
- else
- {
- SPD(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COLOR_BELA"Login",""COLOR_CRVENA"Ukucali ste ne ispravnu sifru.\n"COLOR_BELA"Ukucajte sifru pa se ulogujte.","Login","Izlaz");
- }
- return 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement