Hallo Leute,
ich habe bei meinem Script folgendes Problem:
Wenn ich mich einlogge, und irgendein belibiges Passwort eingebe, loggt man sich ein, auch, wenn das PW falsch ist.
Hier mal die Zeilen vom OnPlayerLogin:
public OnPlayerLogin(playerid,const string[])
{
new string2[64];
new string3[128];
format(string2, sizeof(string2), "/User/%s.cer", ReadName(playerid));
new File: UserFile = fopen(string2, io_read);
if(UserFile)
{
new valtmp[128];
fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
if((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0))
{
new key[128],val[128];
new Data[128];
while(fread(UserFile,Data,sizeof(Data)))
{
key = ini_GetKey(Data);
if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBank] = strval( val ); }
if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
if( strcmp( key , "Admin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
if( strcmp( key , "Supporter" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSupporter] = strval( val ); }
if( strcmp( key , "Skin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSkin] = strval( val ); }
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
if( strcmp( key , "FSkin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFSkin] = strval( val ); }
if( strcmp( key , "Knastzeit" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKnastzeit] = strval( val ); }
if( strcmp( key , "Wanteds" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWanteds] = strval( val ); }
if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
if( strcmp( key , "JPoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJPoints] = strval( val ); }
if( strcmp( key , "Knast" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKnast] = strval( val ); }
if( strcmp( key , "Drogen" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrogen] = strval( val ); }
if( strcmp( key , "Materialien" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMaterials] = strval( val ); }
if( strcmp( key , "Points" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPoint] = strval( val ); }
if( strcmp( key , "Experince" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
if( strcmp( key , "Duty" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDuty] = strval( val ); }
if( strcmp( key , "Respekt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRespekt] = strval( val ); }
if( strcmp( key , "Nummer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNummer] = strval( val ); }
if( strcmp( key , "Buch" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBuch] = strval( val ); }
if( strcmp( key , "AutoLiz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAutoLiz] = strval( val ); }
if( strcmp( key , "BikeLiz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBikeLiz] = strval( val ); }
if( strcmp( key , "FlugLiz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlugLiz] = strval( val ); }
if( strcmp( key , "WaffLiz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWaffLiz] = strval( val ); }
if( strcmp( key , "AnglLiz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAnglLiz] = strval( val ); }
if( strcmp( key , "BootLiz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBootLiz] = strval( val ); }
if( strcmp( key , "LKWLiz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLKWLiz] = strval( val ); }
if( strcmp( key , "Kopfgeld" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKopfgeld] = strval( val ); }
if( strcmp( key , "Opfer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOpfer] = strval( val ); }
if( strcmp( key , "Macher" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMacher] = strval( val ); }
if( strcmp( key , "Auftrag" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAuftrag] = strval( val ); }
if( strcmp( key , "Key" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKey] = strval( val ); }
if( strcmp( key , "CarID" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarID] = strval( val ); }
}
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
fclose(UserFile);
gPlayerLogged[playerid] = 1;
gPlayerAccount[playerid] = 1;
new kills = PlayerInfo[playerid][pLevel];
SetPlayerScore(playerid, kills);
format(string3, sizeof(string3), "*::* Willkommen %s, du hast dich erfolgreicht eingeloggt! *::*", ReadName(playerid));
SendClientMessage(playerid, COLOR_WHITE,string3);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "*::* Falsches Passwort *::*");
fclose(UserFile);
}
}
return 1;
}
Hoffe ihr könnt mir schnell helfen!
Mit freundlichen Grüßen,
Gigg aka Max