23.04.2018, 21:03
Quote:
Nгo tem como fazer isso, pois nгo tem funзгo que resete as variбveis sem mexer com o DOF2, entrando na pasta da conta do jogador, tipo
PHP код:
|
PHP код:
public OnPlayerConnect(playerid)
{
new arquivo[40], name[MAX_PLAYER_NAME], Dialog[240], ip[26];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerIp(playerid, ip, sizeof(ip));
format(arquivo, sizeof(arquivo),"Contas/%sInfos.ini", name);
Player[playerid][pSkin] = 0;
Player[playerid][pScore] = 0;
Player[playerid][pMoney] = 0;
Player[playerid][pProcurado] = 0;
Player[playerid][pPosX] = 0;
Player[playerid][pPosY] = 0;
Player[playerid][pPosZ] = 0;
Player[playerid][pPosA] = 0;
Player[playerid][pLogado] = false;
if(DOF2_FileExists(arquivo))
{
TogglePlayerSpectating(playerid, 1);
format(Dialog, sizeof(Dialog), "{FFFFFF}Nick: {058AFF}%s\n\n{FFFFFF}Registrado: {27FF05}Sim\n\n{FFFFFF}IP: {058AFF}%s", name, ip);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", Dialog, "Confirmar", "Sair");
}else{ // Se Nгo
TogglePlayerSpectating(playerid, 1);
format(Dialog, sizeof(Dialog), "{FFFFFF}Nick: {058AFF}%s\n\n{FFFFFF}Registrado: {FF0505}Nгo\n\n{FFFFFF}IP: {058AFF}%s", name, ip);
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", Dialog, "Confirmar", "Sair");
}
return 1;
}