02.03.2015, 21:28
Hey guys,
So I been working on my script for a bit now and some strange reason my script is messing up on login, before I could login perfectly but now it just says wrong password, heres the code below:
Its odd because it works fine but when I swap it, it works but when I restart the server the player info fucks up, am using the y_ini plugin
So I been working on my script for a bit now and some strange reason my script is messing up on login, before I could login perfectly but now it just says wrong password, heres the code below:
pawn Код:
if(dialogid == DIALOG_LOGIN)
{
if(!response)
{
Kick(playerid);
}
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosY], PlayerInfo[playerid][PosZ], PlayerInfo[playerid][Angle], 0, 0, 0, 0, 0, 0);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon1], PlayerInfo[playerid][Weapon1a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon2], PlayerInfo[playerid][Weapon2a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon3], PlayerInfo[playerid][Weapon3a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon4], PlayerInfo[playerid][Weapon4a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon5], PlayerInfo[playerid][Weapon5a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon6], PlayerInfo[playerid][Weapon6a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon7], PlayerInfo[playerid][Weapon7a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon8], PlayerInfo[playerid][Weapon8a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon9], PlayerInfo[playerid][Weapon9a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon10], PlayerInfo[playerid][Weapon10a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon11], PlayerInfo[playerid][Weapon11a]);
GivePlayerValidWeapon(playerid, PlayerInfo[playerid][Weapon12], PlayerInfo[playerid][Weapon12a]);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"{00FF22}Success!","{FFFFFF}You have successfully logged in!","Ok","");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{FFFFFF}Login","{F81414}You have entered an incorrect password.\n{FFFFFF}Type your password below to login.","Login","Quit");
}
return 1;
}
}