13/02/2022 16:37
(13/02/2022 16:33)k2bi_YT Escreveu: Me mande a callback completa onde está sendo chamada essa p_PlayerLogin
tava ali emcima mas mandei dnv..
public
Código PHP:
forward p_PlayerLogin(playerid, pass[]);
public p_PlayerLogin(playerid, pass[])
{
format(StringRegistro, sizeof(StringRegistro), "zP/Contas/%s.ini", Nome(playerid));
if(strcmp(pass, DOF2_GetString(StringRegistro, "Senha"), true))
{
if(ErrouSenha[playerid] == 4)
{
format(String, sizeof(String), "{E84F33}CONTA: {FFFFFF}O jogador %s foi kickado {FF0000}Motivo: [Errou a senha]", Nome(playerid));
MsgToAll(cortag, String);
zPKick(playerid);
return 1;
}
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "{6495ED}# {FFFFFF}Errou a senha!", "{FFFFFF}Senha {FF0000}Errada!\n\n{FFFFFF}Digita sua senha:", "Login", "Sair");
ErrouSenha[playerid]++;
return 1;
}
else
{
new str[50];
format(str, 50, "zP/ADM/%s.ini", Nome(playerid));
if(DOF2_FileExists(str))
{
if(DOF2_IsSet(str, "Level"))
{
format(str, sizeof(str), "zP/ADM/%s.ini", Nome(playerid));
ContaPlayer[playerid][Level] = DOF2_GetInt(str, "Level");
}
}
ContaPlayer[playerid][Dinheiro] = DOF2_GetInt(StringRegistro, "Dinheiro");
ContaPlayer[playerid][Skin] = DOF2_GetInt(StringRegistro, "Skin");
ContaPlayer[playerid][Score] = DOF2_GetInt(StringRegistro, "Score");
ContaPlayer[playerid][TempoOn] = DOF2_GetInt(StringRegistro, "TempoOn");
ContaPlayer[playerid][CanBeYoutuber] = DOF2_GetBool(StringRegistro, "AuthorizationYT");
GivePlayerMoney(playerid, ContaPlayer[playerid][Dinheiro]);
SetPlayerScore(playerid, ContaPlayer[playerid][Score]);
new StrIp[300];
GetPlayerIp(playerid, StrIp, 300);
DOF2_SetString(StringRegistro, "IP", StrIp);
DOF2_SaveFile();
ContaNova[playerid] = false;
Msg(playerid, cortag, "{E84F33}CONTA: {FFFFFF}Logado com suceeso!");
SetTimerEx("SPP", 500, 0, "i", playerid);
CarregarVariaveis(playerid);
CarregarVip(playerid);
TimerHora[playerid] = SetTimerEx("HoraP", 60000 * 10, 1, "i", playerid); // 60000 * 60 seria multiplicar 1 minuto x 60 minutos = 1 hora
return 1;
}
else
{
format(String, sizeof(String), "{E84F33}CONTA: {FF0000}Player %s Kickado Motivo:[Cancelou o Login]", Nome(playerid));
MsgToAll(cortag, String);
zPKick(playerid);
return 1;
}
}
Código PHP:
ondialog
if(dialogid == REGISTRO)
{
if(response)
{
if(!strlen(inputtext))
{
new IP[128];
GetPlayerIp(playerid, IP, sizeof(IP));
format(String, sizeof(String), "{FFFFFF}Bem vindo! \n\nNick: %s\n\n{FFFFFF}IP: {90EE90}%s\n\nRegistre-se:", Nome(playerid),IP);
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "{6495ED}# {FFFFFF}Registro", String, "Registrar", "Sair");
return 1;
}
else {
p_PlayerLogin(playerid, inputtext);
}
}
}
if (dialogid == LOGIN)
{
if(response)
{
if(!strlen(inputtext))
{
new IP[128];
GetPlayerIp(playerid, IP, sizeof(IP));
format(String, sizeof(String), "{FFFFFF}Bem vindo novamente! \n\nNick: {90EE90}%s\n\n{FFFFFF}IP: {90EE90}%s\n\n{FFFFFF}Digite sua senha:", Nome(playerid), IP);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "{6495ED}# {FFFFFF}Login", String, "Entrar", "Sair");
return 1;
}
else {
p_PlayerLogin(playerid, inputtext);
}
}
}