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 ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"{FF0000][AMAZING GAMING] {FFFFFF}Register","{FF0000}[AG] {FFFFFF}Predugacka sifra","Register","Quit");
- 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,"Score",0);
- INI_WriteInt(File,"Bankmoney",0);
- INI_WriteInt(File,"Banned",0);
- INI_WriteInt(File,"VIP",0);
- INI_WriteInt(File,"Promoter",0);
- INI_WriteInt(File,"Skin",0);
- INI_WriteInt(File,"DJ",0);
- INI_WriteInt(File,"Pasos",0);
- INI_WriteInt(File,"ZK",0);
- INI_WriteInt(File,"GSF",0);
- INI_WriteInt(File,"Varios",0);
- INI_WriteInt(File,"Ballas",0);
- INI_WriteInt(File,"GM",0);
- INI_WriteInt(File,"FBI",0);
- INI_WriteInt(File,"Zlato",0);
- INI_Close(File);
- UlogovanProverava[playerid] = 1;
- PlayerInfo[playerid][pAdmin] = 0;
- PlayerInfo[playerid][pZlato] = 0;
- PlayerInfo[playerid][pDJ] = 0;
- PlayerInfo[playerid][pPromoter] = 0;
- PlayerInfo[playerid][pZK] = 0;
- PlayerInfo[playerid][pVip] = 0;
- PlayerInfo[playerid][pBallas] = 0;
- PlayerInfo[playerid][pVarios] = 0;
- PlayerInfo[playerid][pGSF] = 0;
- PlayerInfo[playerid][pGM] = 0;
- PlayerInfo[playerid][pFBI] = 0;
- }
- }
- case DIALOG_LOGIN:
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);
- GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
- SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
- UlogovanProverava[playerid] = 1;
- SendClientMessage(playerid,-1,"{FF0000}[AG] {FFFFFF}Uspesno si se ulogovao");
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"{FF0000}[AMAZING GAMING] {FFFFFF}Login","{FF0000}[AG] {FFFFFF}Pogresna sifra","Login","Quit");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment