15.03.2013, 08:29
in this code there is no error but it is not functioning properly
this is login system
the person is able to log in the server if his password is correct or incorrect
code:
please help
this is login system
the person is able to log in the server if his password is correct or incorrect
code:
Код:
if (dialogid == dialog_login) { new Pname[MAX_PLAYER_NAME]; new name[MAX_PLAYER_NAME + 4]; new password[30]; new fail=1; GetPlayerName(playerid,Pname,sizeof(Pname)); format(name,sizeof(name),"%s.txt",Pname); format(password,sizeof(password),"Password:%s|",inputtext); new File:check = fopen(name,io_read); while(fread(check,password)) { fail = 0; SendClientMessage(playerid,COLOR_WHITE,"successfully logged in"); SpawnPlayer(playerid); } if(fail) { SendClientMessage(playerid,COLOR_GREY,"you failed to login please restart the game and login again"); Kick(playerid); } }