[pawn]//-------------------------------------------------------------------------- //Request Register Dialog //-------------------------------------------------------------------------- if(BUD::IsNameRegistered(PlayerName2(playerid)) == true && AccInfo[playerid][ALogin] == 0) { new string[256]; //---------------------------------------------------------------------- format(string, 256, "{37FF00}Welcome {FF0000}%s{37FF00}!\n\ {37FF00}Please login with the password you set to registration!\n\ {37FF00}Authentification is required to charge your statistics", PlayerName2(playerid)); //---------------------------------------------------------------------- ShowPlayerDialog(playerid, DIALOGID+67, DIALOG_STYLE_PASSWORD,"{0009FF}R{FFFF00}S{FF0000}G{AFAFAF} - Login Account",string,"Login","Quit"); } //-------------------------------------------------------------------------- //Request Register Dialog //-------------------------------------------------------------------------- if(BUD::IsNameRegistered(PlayerName2(playerid)) == false) { new string[250]; //---------------------------------------------------------------------- format(string, 250, "{37FF00}Welcome {FF0000}%s{37FF00} to {0009FF}Romania {FFFF00}Stunt {FF0000}Generation{37FF00}!\n\ \n\ {FFD000}Your name {FF0000}%s{FFD000} is not Registered on our server!\n\ {37FF00}Enter a password{FF0000}(Must have 3-30 caracters)", PlayerName2(playerid), PlayerName2(playerid)); //---------------------------------------------------------------------- ShowPlayerDialog(playerid, DIALOGID+66, DIALOG_STYLE_PASSWORD,"{0009FF}R{FFFF00}S{FF0000}G{AFAFAF} - Register Account",string,"Register","Quit"); }[/pawn] Si ondialogresponse: [pawn] if(dialogid == DIALOGID+66) { if(!response) { Kick(playerid); } if(response) { //------------------------------------------------------------------ new y, m, d, tmp3[20], rstring[255], userid, LLOn[40], AVW[5], UFS[20], RSETH[20], IGSS[20], DLinesD[10], AST[30], Holds[20]; //------------------------------------------------------------------ if(strlen(inputtext) < 4 || strlen(inputtext) > 20) { format(rstring,256,"{FF0000}Sorry {FF0000}%s\n{37FF00}but your password must contain atleast 3 characters\nand a maximum of 20 characters!\n\nPlease, re-enter your desired password below:",pName(playerid)); return ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_PASSWORD,"{0009FF}R{FFFF00}S{FF0000}G{AFAFAF} - Register ERROR",rstring,"Register","Quit"); } //------------------------------------------------------------------ if(strcmp(inputtext, "sendmypass", true) != 0) { //-------------------------------------------------------------- getdate(y, m, d); GetPlayerIp(playerid,tmp3,100); //-------------------------------------------------------------- BUD::RegisterName(PlayerName2(playerid), inputtext); userid = BUD::GetNameUID(PlayerName2(playerid)); BUD::SetStringEntry(userid, "APass", inputtext, 256); BUD::SetStringEntry(userid, "IP", tmp3, 20); //-------------------------------------------------------------- strcat(UFS, "0/0"); strcat(IGSS, "0/0/0/0"); strcat(RSETH, "0/0/0"); strcat(AVW, "0/0"); strcat(DLinesD, "///"); strcat(AST, "0/0/0/0/0/0/0"); strcat(Holds, "//////////"); //-------------------------------------------------------------- format(LLOn, 40, "%d/%d/%d=1", y, m, d); //-------------------------------------------------------------- BUD::MultiSet(userid, "iiiiiiiiiiiiiiiiiiiiiisssssssssssssssss", "Hours", 0, "Minutes", 0, "Seconds", 0, "Kills", 0, "Deaths", 0, "Admin", 0, "Vip", 0, "Respect", 0, "NegRespect", 0, "C4Bombs", 0, "Banned", 0, "EnMS", 0, "Coins", 0, "Score", 0, "SPoints", 0, "AutoLog", 0, "Money", 0, "PMStyle", 0, "RaceP", 0, "KillingSpree", 0, "DriftP", 0, "UseHolds", 0, "Ignores", IGSS, "RSEThings", RSETH, "UseFavSkin", UFS, "AdmVipWarns", AVW, "LasONLoggedIn", LLOn, "DescriptLines", DLinesD, "HObject0", Holds, "HObject1", Holds, "HObject2", Holds, "HObject3", Holds, "HObject4", Holds, "HObject5", Holds, "HObject6", Holds, "HObject7", Holds, "HObject8", Holds, "HObject9", Holds, "AStats", AST); //-------------------------------------------------------------- SetPlayerMoney(playerid, 50000); AccInfo[playerid][LoggedIn] = 1; //-------------------------------------------------------------- SendClientMessage(playerid, green, "You are now Registered, and have been automaticaly Logged in!"); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); } else { format(rstring,256,"{FF0000}Sorry {FF0000}%s\n{37FF00}but you cannot Register your account\nwith that password!\n\nPlease, re-enter your desired password below:",pName(playerid)); return ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_PASSWORD,"{0009FF}R{FFFF00}S{FF0000}G{AFAFAF} - Register ERROR",rstring,"Register","Quit"); } return 1; } } //-------------------------------------------------------------------------- //Romania Super Stunt - v5 - Login Dialog //-------------------------------------------------------------------------- if(dialogid == DIALOGID+67) { new IPass[128], userid, lstring[256], string[256]; //---------------------------------------------------------------------- userid = BUD::GetNameUID(PlayerName2(playerid)); BUD::GetStringEntry(userid, "APass", IPass, 128); //---------------------------------------------------------------------- if(response == 0) Kick(playerid); else if(response) { if(strlen(inputtext) > 3) { if(strcmp(IPass, inputtext, true) != 0) { AccInfo[playerid][FailLogin]++; printf("LOGIN: Failed Login: %s. Wrong password (%s) (%d)", PlayerName2(playerid), inputtext, AccInfo[playerid][FailLogin]); if(AccInfo[playerid][FailLogin] == MAX_FAIL_LOGINS) { format(string, sizeof(string), "Player %s has been automatically kicked (Reason: Incorrect Passwords)", PlayerName2(playerid) ); SendClientMessageToAll(red, string); print(string); Kick(playerid); } format(lstring,256,"{37FF00}Sorry {FF0000}'%s'\n{37FF00}but you've entered the wrong password!\n\nPlease, re-enter your correct password below:",pName(playerid)); return ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_PASSWORD,"Login Error",lstring,"Login","Quit"); } else if(strcmp(IPass, inputtext, true) == 0) { //---------------------------------------------------------- LoginPlayer(playerid); //---------------------------------------------------------- if(AccInfo[playerid][Level] > 0 || AccInfo[playerid][pVip] > 0) { LoginPlayerInfo(playerid); } else return SendClientMessage(playerid,green,"You have been Successfully logged!"); } } else { AccInfo[playerid][FailLogin]++; //-------------------------------------------------------------- if(AccInfo[playerid][FailLogin] == MAX_FAIL_LOGINS) { format(string, sizeof(string), "Player %s has been automatically kicked (Reason: Incorrect Passwords)", PlayerName2(playerid) ); SendClientMessageToAll(red, string); print(string); Kick(playerid); } //-------------------------------------------------------------- format(lstring,256,"{37FF00}Sorry {FF0000}'%s'\n{37FF00}but you've entered the wrong password!\n\nPlease, re-enter your correct password below:",pName(playerid)); return ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_PASSWORD,"Login Error",lstring,"Login","Quit"); } } }[/pawn]