07.12.2016, 15:23
Eae galera fiz um sistema de registro aqui ele salva a skin o score e posiзгo porem nгo carrega a skin ele carrega o score e posiзгo mais skin nгo carrega, nгo consigo arrumar de jeito nenhum.
pawn Код:
if(dialogid == dialog_login)
{
if(response)
{
new nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, nome, sizeof(nome));
new str[MAX_PLAYER_NAME];
format(str, sizeof(str), "Contas/%s.ini", nome);
new senha[134];
senha = DOF2_GetString(str, "Senha");
if(!strcmp(senha, inputtext, true))
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, dialog_login, DIALOG_STYLE_INPUT, "{FF230A}Login", "\t{1CD622}Por favor faзa o login.", "Logar-se", "Sair");
}
else
{
new level, roupa;
new Float:x, Float:y, Float:z;
level = DOF2_GetInt(str, "Level");
roupa = DOF2_GetInt(str, "Roupa");
x = DOF2_GetFloat(str, "X");
y = DOF2_GetFloat(str, "Y");
z = DOF2_GetFloat(str, "Z");
SetSpawnInfo(playerid, 0, roupa, x,y,z, 0.0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
new plogin;
plogin = DOF2_GetInt(str, "PLOGIN");
if(plogin == 0)
{
DOF2_SetInt(str, "PLOGIN", 1);
DOF2_SaveFile();
SetPlayerSkin(playerid, SKIN_INICIAL);
SetPlayerScore(playerid, SCORE_INICIAL);
SetPlayerPos(playerid, POS_X_INICIAL, POS_Y_INICIAL, POS_Z_INICIAL);
}
else
{
SetPlayerScore(playerid, level);
SetPlayerSkin(playerid, roupa);
}
}
}
else
ShowPlayerDialog(playerid, dialog_login, DIALOG_STYLE_INPUT, "{FF230A}Login", "\t{1CD622}Por favor faзa o login.", "Logar-se", "Sair");
}
else
{
Kick(playerid);
}
}