23.04.2010, 23:58
Quote:
Originally Posted by Adil
Quote:
|
Quote:
if(fexist(string)) { gPlayerAccount[playerid] = 1; new loginstring[128]; new loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname) ); SendClientMessage(playerid,COLOR_LIGHTRED,"This Mod Made By Fredy_Cole !, Type /Credits For More Credits ."); //SendClientMessage(playerid,COLOR_LIGHTRED,"The Ow."); SendClientMessage(playerid,COLOR_WHITE,"Our Vent: Version: 2.1 IP: 80.179.144.106 Port: 6365"); SendClientMessage(playerid,COLOR_WHITE,"Our Forum: iAtraf.Co.il"); SendClientMessage(playerid,COLOR_YELLOW,"Welcome to Los Santos RolePlay -"); SendClientMessage(playerid, COLOR_YELLOW, "SERVER: That nick is registered, please login"); // SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now login by typing /login <password>"); format(loginstring,sizeof(loginstring),"Welcome to iAtraf-RP. \n \nThat name is registered.\nPlease enter your password below:"); ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Lo gin",loginstring,"Login","Exit"); return 1; } |
Quote:
if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0) { new loginname[64]; new loginstring[128]; GetPlayerName(i,loginname,64); format(loginstring,sizeof(loginstring),"Welcome to iAtraf-RP. \n \nThat name is registered. please enter your password below:"); ShowPlayerDialog(i,1,DIALOG_STYLE_INPUT,"Login",lo ginstring,"Login","Exit"); } } |
Quote:
fclose(hFile); new loginstring[128]; new loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname) ); format(loginstring,sizeof(loginstring),"Welcome to iAtraF-RP. \n \nThat name is registered.\nPlease enter your password below:",loginname); ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Lo gin",loginstring,"Login","Exit"); |
Quote:
new loginstring[128]; new loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname) ); format(loginstring,sizeof(loginstring),"ERROR: Incorrect passowrd!\n \nPlease enter the correct password:",loginname); ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT ,"Login",loginstring,"Login","Exit"); fclose(UserFile); gPlayerLogTries[playerid] += 1; if(gPlayerLogTries[playerid] == 4) { Kick(playerid); } return 1; |
Quote:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new sendername[MAX_PLAYER_NAME]; new string[128]; if(response) { if(dialogid == 1 || dialogid == 12347) { if(strlen(inputtext)) { new tmppass[64]; strmid(tmppass, inputtext, 0, strlen(inputtext), 255); // Encrypt(tmppass); OnPlayerLogin(playerid,tmppass); } else { new loginstring[128]; new loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname) ); format(loginstring,sizeof(loginstring),"ERROR: Incorrect password!\n \nPlease enter the correct password:",loginname); ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT ,"Login",loginstring,"Login","Exit"); gPlayerLogTries[playerid] += 1; if(gPlayerLogTries[playerid] == 3) { Kick(playerid); } } } if(dialogid == 2) { if(strlen(inputtext)) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "users/%s.ini", sendername); new File: hFile = fopen(string, io_read); if (hFile) { SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one."); fclose(hFile); return 1; } new tmppass[64]; strmid(tmppass, inputtext, 0, strlen(inputtext), 255); //Encrypt(tmppass); OnPlayerRegister(playerid,tmppass); } else { new regstring[128]; new regname[64]; GetPlayerName(playerid,regname,sizeof(regname)); format(regstring,sizeof(regstring),"Welcome, %s\nYou dont have an account.\nPlease register:",regname); ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT ,"Register",regstring,"Register","Exit"); } } } return 1; } |