PDA

View Full Version : Help with password


D1am0nd
25/09/2015, 04:34 PM
Hello.

I am currently working on the regiser/login system, the latest thing which I have updated is, when the player had registered his name and when he re-connected, it would not be possible for him to login without typing a password. Before he was able to login without typing his password, it is like just pressing enter and okay. So I scripted it to be like, he must atleast type a character, to login. But it is not right, the player must type his correct password. For example, he was registered with the pass "hey123", but was always loging in with the pass "he" or whatever it is. Is that something called like hash password?

I want the player to type his password correctly on the login.

Please help me.

Here is some code:

public OnPlayerConnect(playerid)
{
playerOnline++;
ResetVars(playerid);
ConnectVars(playerid);
new string[128];
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
format(string,sizeof(string),""COL_WHITE" Logging",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""COL_WHITE"Account Status: {00CF67}REGISTERED\n{FFFFFF}Login by typing your password below:","Login","Quit");
}
else
{
format(string,sizeof(string),""COL_WHITE"Register",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,string,""COL_WHITE"Welcome to ...\n{FFFFFF}Account Status: {FF0000}UN-REGISTERED\n{FFFFFF}Register by typing your desidered password below:","Register","Quit");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat"{FF0000} You must Register to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new str[256],IP[16],buf[129];
GetPlayerIp(playerid, IP, sizeof(IP));
if(!strlen(inputtext))
{
format(str,sizeof(str),""COL_WHITE"Register",PlayerName(playerid));
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,str,""COL_WHITE"Welcome to ...\n{FFFFFF}Account Status: {FF0000}UN-REGISTERED\n{FFFFFF}Register by typing your desidered password below:","Register","Quit");
}

new INI:File = INI_Open(UserPath(playerid));
WP_Hash(buf, sizeof(buf), inputtext);
INI_SetTag(File,"data");
INI_WriteString(File,"pPassword", buf);
INI_WriteInt(File,"pXP",0);
INI_WriteInt(File,"pKills",0);
INI_WriteInt(File,"pDeaths",0);
INI_WriteInt(File,"pRank",0);
INI_WriteInt(File,"pEvac",0);
INI_WriteInt(File,"pAdminLevel",0);
INI_WriteInt(File,"pVipLevel",0);
INI_WriteInt(File,"pHour",0);
INI_WriteInt(File,"pMin",0);
INI_WriteInt(File,"pSec",0);
INI_WriteInt(File,"pMapsPlayed",0);
INI_WriteInt(File,"pCoins",0);
INI_WriteString(File,"pIP",IP);
INI_Close(File);

playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
pInfo[playerid][pLogged] = 1;
}
}

case DIALOG_LOGIN:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat"{FF0000} You must Login to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
if(!strcmp(buf,pInfo[playerid][pPassword]))
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
pInfo[playerid][pLogged] = 1;
playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
SendClientMessage(playerid,-1,""chat""COL_LGREEN" {66FF66}You have successfully logged in!");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
printf("%s",pInfo[playerid][pPassword]);
}
else
{
new string[256];
format(string,sizeof(string),""COL_WHITE" Logging",PlayerName(playerid));
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""COL_WHITE"Account Status: {00CF67}REGISTERED\n{FFFFFF}Login by typing your password below:","Login","Quit");
}
return 1;
}
}

jlalt
25/09/2015, 04:56 PM
i don't think player password loading at this moment can you show me player load faction?

if(!strcmp(buf,pInfo[playerid][pPassword]))

D1am0nd
25/09/2015, 06:00 PM
case DIALOG_LOGIN:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat"{FF0000} You must Login to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
if(!strcmp(buf,pInfo[playerid][pPassword]))
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
pInfo[playerid][pLogged] = 1;
playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
SendClientMessage(playerid,-1,""chat""COL_LGREEN" {66FF66}You have successfully logged in!");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
printf("%s",pInfo[playerid][pPassword]);
}
else
{
new string[256];
format(string,sizeof(string),""COL_WHITE" Logging",PlayerName(playerid));
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""COL_WHITE"Account Status: {00CF67}REGISTERED\n{FFFFFF}Login by typing your password below:","Login","Quit");
}
return 1;
}
}

Aly
25/09/2015, 06:04 PM
Dude, you have to load the player's password before you check if the passwords match,I mean before this sequence:
new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
if(!strcmp(buf,pInfo[playerid][pPassword]))
Can you show me this function:
LoadUser_data

Erwin.
25/09/2015, 06:13 PM
DELETE

D1am0nd
25/09/2015, 06:14 PM
public LoadUser_data(playerid,name[],value[])
{
INI_String("pPassword", pInfo[playerid][pPassword], 129);
INI_Int("pXP",pInfo[playerid][pXP]);
INI_Int("pKills",pInfo[playerid][pKills]);
INI_Int("pDeaths",pInfo[playerid][pDeaths]);
INI_Int("pRank",pInfo[playerid][pRank]);
INI_Int("pEvac",pInfo[playerid][pEvac]);
INI_Int("pAdminLevel",pInfo[playerid][pAdminLevel]);
INI_Int("pVipLevel",pInfo[playerid][pVipLevel]);
INI_Int("pHour",pInfo[playerid][pHour]);
INI_Int("pMin",pInfo[playerid][pMin]);
INI_Int("pSec",pInfo[playerid][pSec]);
INI_Int("pMapsPlayed",pInfo[playerid][pMapsPlayed]);
INI_Int("pCoins",pInfo[playerid][pCoins]);
return 1;
}

Aly
25/09/2015, 06:18 PM
Put a printf after the datas are loaded, like this

public LoadUser_data(playerid,name[],value[])
{
INI_String("pPassword", pInfo[playerid][pPassword], 129);
INI_Int("pXP",pInfo[playerid][pXP]);
INI_Int("pKills",pInfo[playerid][pKills]);
INI_Int("pDeaths",pInfo[playerid][pDeaths]);
INI_Int("pRank",pInfo[playerid][pRank]);
INI_Int("pEvac",pInfo[playerid][pEvac]);
INI_Int("pAdminLevel",pInfo[playerid][pAdminLevel]);
INI_Int("pVipLevel",pInfo[playerid][pVipLevel]);
INI_Int("pHour",pInfo[playerid][pHour]);
INI_Int("pMin",pInfo[playerid][pMin]);
INI_Int("pSec",pInfo[playerid][pSec]);
INI_Int("pMapsPlayed",pInfo[playerid][pMapsPlayed]);
INI_Int("pCoins",pInfo[playerid][pCoins]);
printf("Password: %s", pInfo[playerid][pPassword]);
return 1;
}

Then post your server log please.

jlalt
25/09/2015, 06:32 PM
i hope this will work


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat"{FF0000} You must Register to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new str[256],IP[16],buf[129];
GetPlayerIp(playerid, IP, sizeof(IP));
if(!strlen(inputtext))
{
format(str,sizeof(str),""COL_WHITE"Register",PlayerName(playerid));
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,str,""COL_WHITE"Welcome to ...\n{FFFFFF}Account Status: {FF0000}UN-REGISTERED\n{FFFFFF}Register by typing your desidered password below:","Register","Quit");
}

new INI:File = INI_Open(UserPath(playerid));
WP_Hash(buf, sizeof(buf), inputtext);
INI_SetTag(File,"data");
INI_WriteString(File,"pPassword", buf);
INI_WriteInt(File,"pXP",0);
INI_WriteInt(File,"pKills",0);
INI_WriteInt(File,"pDeaths",0);
INI_WriteInt(File,"pRank",0);
INI_WriteInt(File,"pEvac",0);
INI_WriteInt(File,"pAdminLevel",0);
INI_WriteInt(File,"pVipLevel",0);
INI_WriteInt(File,"pHour",0);
INI_WriteInt(File,"pMin",0);
INI_WriteInt(File,"pSec",0);
INI_WriteInt(File,"pMapsPlayed",0);
INI_WriteInt(File,"pCoins",0);
INI_WriteString(File,"pIP",IP);
INI_Close(File);

playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
pInfo[playerid][pLogged] = 1;
}
}

case DIALOG_LOGIN:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat"{FF0000} You must Login to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
INI_String("pPassword", pInfo[playerid][pPassword], 129);
if(!strcmp(buf,pInfo[playerid][pPassword]))
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
pInfo[playerid][pLogged] = 1;
playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
SendClientMessage(playerid,-1,""chat""COL_LGREEN" {66FF66}You have successfully logged in!");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
printf("%s",pInfo[playerid][pPassword]);
}
else
{
new string[256];
format(string,sizeof(string),""COL_WHITE" Logging",PlayerName(playerid));
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""COL_WHITE"Account Status: {00CF67}REGISTERED\n{FFFFFF}Login by typing your password below:","Login","Quit");
}
return 1;
}
}

D1am0nd
25/09/2015, 06:37 PM
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[21:37:01]
[21:37:01] Server Plugins
[21:37:01] --------------
[21:37:01] Loading plugin: streamer
[21:37:01] Loaded.
[21:37:01] Loading plugin: sscanf
[21:37:01]

[21:37:01] ===============================

[21:37:01] sscanf plugin loaded.

[21:37:01] (c) 2009 Alex "******" Cole

[21:37:01] 0.3d-R2 500 Players "dnee"

[21:37:01] ===============================

[21:37:01] Loaded.
[21:37:01] Loading plugin: Whirlpool
[21:37:01]
[21:37:01] ==================
[21:37:01]
[21:37:01] Whirlpool loaded
[21:37:01]
[21:37:01] ==================
[21:37:01]
[21:37:01] Loaded.
[21:37:01] Loaded 3 plugins.

[21:37:01]
[21:37:01] Filterscripts
[21:37:01] ---------------
[21:37:01] Loading filterscript 'bunnyhop.amx'...
[21:37:01] Loading filterscript 'antiafk.amx'...
[21:37:01] Unable to load filterscript 'antiafk.amx'.
[21:37:01] Loaded 1 filterscripts.

[21:37:01]
[21:37:01]
[21:37:01]
[21:37:01] =======================================
[21:37:01] | |
[21:37:01] | YSI version 3.09.0684 |
[21:37:01] | By Alex "******" Cole |
[21:37:01] | |
[21:37:01] =======================================
[21:37:01]
[21:37:01]
[21:37:01]
[21:37:01]
----------------------------------
[21:37:01] TESTTING SERVER
[21:37:01] ----------------------------------

[21:37:01] Number of vehicle models: 0
[21:37:27] [connection] (hidden IP) requests connection cookie.
[21:37:28] [connection] incoming connection: (hidden IP) id: 0
[21:37:28] [join] D1am0nd has joined the server ((hidden IP))
[21:37:28] Password: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[21:37:31] Password: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[21:37:31] 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[21:37:33] loading Map /Maps/0.ini
[21:37:33]
--------------------------------------
[21:37:33] No Map Objects Did not Load
[21:37:33] --------------------------------------

[21:37:33] Filterscript 'nonezma.amx' loaded.
[21:37:33] Map ID 0's Information Has Been Loaded.
[21:37:34] Selected humans
[21:37:34] Finished Selecting teams
[21:37:45] [part] D1am0nd has left the server (0:1)

Aly
25/09/2015, 06:52 PM
Hmm... it gets loaded.Now let's try to see if the password you enter into the dialog is correctly hashed.
Put a printf again

new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
printf("DialogPass: %s",buf);
printf("FilePass: %s",pInfo[playerid][pPassword]);

Do this once with the same password and then with a wrong password and please post the results.(server log)

D1am0nd
25/09/2015, 07:08 PM
Hmm... it gets loaded.Now let's try to see if the password you enter into the dialog is correctly hashed.
Put a printf again

new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
printf("DialogPass: %s",buf);
printf("FilePass: %s",pInfo[playerid][pPassword]);

Do this once with the same password and then with a wrong password and please post the results.(server log)

Sorry, where I have to put those? On LoadUser_data or OnDialogResponse?

Aly
25/09/2015, 07:12 PM
case DIALOG_LOGIN:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat"{FF0000} You must Login to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
printf("DialogPass: %s",buf);
printf("FilePass: %s",pInfo[playerid][pPassword]);
if(!strcmp(buf,pInfo[playerid][pPassword]))
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
pInfo[playerid][pLogged] = 1;
playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
SendClientMessage(playerid,-1,""chat""COL_LGREEN" {66FF66}You have successfully logged in!");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
printf("%s",pInfo[playerid][pPassword]);
}
else
{
new string[256];
format(string,sizeof(string),""COL_WHITE" Logging",PlayerName(playerid));
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""COL_WHITE"Account Status: {00CF67}REGISTERED\n{FFFFFF}Login by typing your password below:","Login","Quit");
}
return 1;
}
}

D1am0nd
25/09/2015, 07:31 PM
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[22:28:39]
[22:28:39] Server Plugins
[22:28:39] --------------
[22:28:39] Loading plugin: streamer
[22:28:39] Loaded.
[22:28:39] Loading plugin: sscanf
[22:28:39]

[22:28:39] ===============================

[22:28:39] sscanf plugin loaded.

[22:28:39] (c) 2009 Alex "******" Cole

[22:28:39] 0.3d-R2 500 Players "dnee"

[22:28:39] ===============================

[22:28:39] Loaded.
[22:28:39] Loading plugin: Whirlpool
[22:28:39]
[22:28:39] ==================
[22:28:39]
[22:28:39] Whirlpool loaded
[22:28:39]
[22:28:39] ==================
[22:28:39]
[22:28:39] Loaded.
[22:28:39] Loaded 3 plugins.

[22:28:39]
[22:28:39] Filterscripts
[22:28:39] ---------------
[22:28:39] Loading filterscript 'bunnyhop.amx'...
[22:28:39] Loading filterscript 'antiafk.amx'...
[22:28:39] Unable to load filterscript 'antiafk.amx'.
[22:28:39] Loaded 1 filterscripts.

[22:28:39]
[22:28:39]
[22:28:39]
[22:28:39] =======================================
[22:28:39] | |
[22:28:39] | YSI version 3.09.0684 |
[22:28:39] | By Alex "******" Cole |
[22:28:39] | |
[22:28:39] =======================================
[22:28:39]
[22:28:39]
[22:28:39]
[22:28:39]
----------------------------------
[22:28:39] TESTING SERVER
[22:28:39] ----------------------------------

[22:28:39] Number of vehicle models: 0
[22:29:34] [connection] (hidden ip) requests connection cookie.
[22:29:35] [connection] incoming connection: (hidden ip) id: 0
[22:29:35] [join] D1am0nd has joined the server ((hidden ip))
[22:29:35] Password: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:29:42] DialogPass: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:29:42] FilePass: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:29:42] Password: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:29:42] 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:29:44] loading Map /Maps/0.ini
[22:29:44]
--------------------------------------
[22:29:44] No Map Objects Did not Load
[22:29:44] --------------------------------------

[22:29:44] Filterscript 'nonezma.amx' loaded.
[22:29:44] Map ID 0's Information Has Been Loaded.
[22:29:45] Selected humans
[22:29:45] Finished Selecting teams
[22:29:52] [part] D1am0nd has left the server (0:1)
[22:30:39] [connection] (hidden ip)requests connection cookie.
[22:30:40] [connection] incoming connection: (hidden ip) id: 0
[22:30:40] [join] D1am0nd has joined the server ((hidden ip))
[22:30:40] Password: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:30:46] DialogPass: 480B1A7F4AAD0E7B4A04409DD617E61F13FB8B8D665C5A45F8 9A13F8904225F346DC2E55F5C05C8B48BF79EDAC196C28130E 55BF47C6CC6C3590FF51FCAA37F1
[22:30:46] FilePass: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:30:50] Password: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:30:50] loading Map /Maps/1.ini
[22:30:50] Map ID 1's Information Has Been Loaded.
[22:30:50] Filterscript 'nonezma.amx' load failed.
[22:30:51] Selected humans
[22:30:51] Finished Selecting teams
[22:30:55] DialogPass: 2447A8476EDF4A5C6282AAF5EB7AE59C5B44E015FF9DB5BC0B D806812BC8CA843F767D49DCDBD05732B9A5CBF6E326E860C3 20DF2E882422673F7A398F6321A7
[22:30:55] FilePass: 3BFC49C2C54A8C5EAE234B78A794B07EBFCC0ABA50EAE57962 9CCB6A303E26FBAAAE440E7653EB8F52406926AED935F52B1D 3A0F5BF75806D3E84BA402EF8B88
[22:31:00] [part] D1am0nd has left the server (0:1)
[22:31:12] --- Server Shutting Down.


When I type incorrect password, it logs me in, but when I spawn, the login dialog box appeared again and I had to write password again. Everything was fine, even though it was correct or incorrect password. But when I type correct password at the first time, the loagin dialog box doesn't appear on spawn.

Aly
25/09/2015, 07:43 PM
Ok i get it, try it like this please:

case DIALOG_LOGIN:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat"{FF0000} You must Login to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
if(!strcmp(buf,pInfo[playerid][pPassword]))
{
//I deleted this parsing file because you don't need it, cuz you already loaded the account
pInfo[playerid][pLogged] = 1;
playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
SendClientMessage(playerid,-1,""chat""COL_LGREEN" {66FF66}You have successfully logged in!");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
printf("%s",pInfo[playerid][pPassword]);
}
else
{ //Here comes the important change
new string[256];
format(string,sizeof(string),""COL_WHITE" Logging",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""COL_WHITE"Account Status: The password that you have entered is wrong.\nLogin by typing your correct password below:","Login","Quit");
}
return 1;
}
}

D1am0nd
25/09/2015, 07:55 PM
It works! Thanks alot mate.