[Ajuda] como fazer para salvar na pasta contas
#1

Bom tenho queria fazer um sistema de EXP mas level na GM, porem eu tirei da GM Base DTEN 35 que upar por tempo.Em fim estou com um problema grave, depois de montar todo o sistema ai eu configurava um tempo X para ganhar XP tipo 1 minuto 1 XP e sempre fica no zero EX:
if(DOF2_GetInt(gFile, "Tempo") >= TEMPO_EXP-1)
{
DOF2_SetInt(gFile, "EXP", DOF2_GetInt(gFile, "EXP")+EXP_POR_TEMPO);
DOF2_SetInt(gFile, "Tempo", 0);
PlayerPlaySound(i, 1057, X, Y, Z);
format(string, sizeof(string), "{00FF00}[LEVEL UP] {CCFF00}Vocк ganhou mais experiкncia. {FF0000}({00FF00}%d{FF0000}/{00FF00}%d{FF0000})", DOF2_GetInt(gFile, "EXP"), MAX_PLAYER_EXP);
SendClientMessage(i, -1, string);
}
ai vai dar no game que vocк ganhou mais experiencia ai fica sempre (0/5) nгo esta aumentando, pois ai eu descobrir q oq estava faltando й setar isso na pasta de salvamento ai iria contianuar akele (0/5) aki esta:
enum Informacoes
{
ADMIN_NIVEL,
JOGADOR_MATOU,
JOGADOR_MORREU,
SKIN_JOGADOR,
NIVEL_JOGADOR,
RESPEITO_JOGADOR,
SEXO_JOGADOR,
TUTORIAL_JOGADOR,
LIC_AERO_JOGADOR,
LIC_BARCO_JOGADOR,
LIC_MOTOS_JOGADOR,
LIC_CARROS_JOGADOR,
LIC_CAMINHAO_ONIBUS_JOGADOR,
PORTE_ARMAS_JOGADOR,
ESTILO_LUTA_JOGADOR,
VERIFICAR_MODO_ADMIN,
ORGANIZACAO_JOGADOR,
CARGO_ORG_JOGADOR,
GPS_DO_JOGADOR,
CONTA_BANCO_JOGADOR,
DINAMITE_JOGADOR,
NIVEL_PROCURADO,
Float:UltimaPosX,
Float:UltimaPosY,
Float:UltimaPosZ,
Float:UltimoAngulo,
UltimoInterior,
NASCIMENTO,
} new DadosJogador[MAX_PLAYERS][Informacoes];


OnPlayerLogin(playerid,password[]);
public OnPlayerLogin(playerid,password[])
{
format(String,sizeof(String),"cCONTAS/%s.ini",PlayerNick(playerid));
if(strcmp(Encrypt(password),DOF2_GetString(String, "Senha"),true) == 0)
{
DOF2_SetString(String,"Senha",Encrypt(password));
DadosJogador[playerid][ADMIN_NIVEL] = DOF2_GetInt(String,"NivelAdmin");
DadosJogador[playerid][JOGADOR_MATOU] = DOF2_GetInt(String,"Matou");
DadosJogador[playerid][JOGADOR_MORREU] = DOF2_GetInt(String,"Morreu");
GivePlayerMoneyEx(playerid,DOF2_GetInt(String,"Din heiro"));
DadosJogador[playerid][SKIN_JOGADOR] = DOF2_GetInt(String,"SkinID");
DadosJogador[playerid][NIVEL_JOGADOR] = DOF2_GetInt(String, "Level");
DadosJogador[playerid][RESPEITO_JOGADOR] = DOF2_GetInt(String,"Respeito");
DadosJogador[playerid][SEXO_JOGADOR] = DOF2_GetInt(String,"Sexo");
DadosJogador[playerid][TUTORIAL_JOGADOR] = DOF2_GetInt(String,"Tutorial");
DadosJogador[playerid][LIC_AERO_JOGADOR] = DOF2_GetInt(String,"LicencaAero");
DadosJogador[playerid][LIC_BARCO_JOGADOR] = DOF2_GetInt(String,"LicencaBarco");
DadosJogador[playerid][LIC_MOTOS_JOGADOR] = DOF2_GetInt(String,"LicencaMoto");
DadosJogador[playerid][LIC_CARROS_JOGADOR] = DOF2_GetInt(String,"LicencaCarro");
DadosJogador[playerid][LIC_CAMINHAO_ONIBUS_JOGADOR] = DOF2_GetInt(String,"LicencaCamOni");
DadosJogador[playerid][PORTE_ARMAS_JOGADOR] = DOF2_GetInt(String,"LicencaArma");
DadosJogador[playerid][ESTILO_LUTA_JOGADOR] = DOF2_GetInt(String,"EstiloLuta");
DadosJogador[playerid][ORGANIZACAO_JOGADOR] = DOF2_GetInt(String, "Organizacao");
DadosJogador[playerid][CARGO_ORG_JOGADOR] = DOF2_GetInt(String, "CargoORG");
DadosJogador[playerid][GPS_DO_JOGADOR] = DOF2_GetInt(String, "GPS");
DadosJogador[playerid][CONTA_BANCO_JOGADOR] = DOF2_GetInt(String,"Banco");
DadosJogador[playerid][DINAMITE_JOGADOR] = DOF2_GetInt(String,"Dinamites");
DadosJogador[playerid][NIVEL_PROCURADO] = DOF2_GetInt(String,"NivelProcurado");
DadosJogador[playerid][UltimaPosX] = DOF2_GetFloat(String, "X");
DadosJogador[playerid][UltimaPosY] = DOF2_GetFloat(String, "Y");
DadosJogador[playerid][UltimaPosZ] = DOF2_GetFloat(String, "Z");
DadosJogador[playerid][UltimoAngulo] = DOF2_GetFloat(String, "Angulo");
DadosJogador[playerid][UltimoInterior] = DOF2_GetInt(String, "Interior");
DadosJogador[playerid][NASCIMENTO] = DOF2_GetInt(String,"Nascimento");

OnPlayerRegister(playerid, password[]);
public OnPlayerRegister(playerid, password[])
{
format(String,sizeof(String),"cCONTAS/%s.ini",PlayerNick(playerid));
if(IsPlayerConnected(playerid))
{
DOF2_CreateFile(String);
DOF2_SetString(String,"Senha",Encrypt(password));
DOF2_SetInt(String,"NivelAdmin",DadosJogador[playerid][ADMIN_NIVEL]);
DOF2_SetInt(String,"Dinheiro",GetPlayerMoney(playe rid));
DOF2_SetInt(String,"Matou",DadosJogador[playerid][JOGADOR_MATOU]);
DOF2_SetInt(String,"Morreu",DadosJogador[playerid][JOGADOR_MORREU]);
DOF2_SetInt(String,"SkinID",DadosJogador[playerid][SKIN_JOGADOR]);
DOF2_SetInt(String,"Level",DadosJogador[playerid][NIVEL_JOGADOR]);
DOF2_SetInt(String,"Respeito",DadosJogador[playerid][RESPEITO_JOGADOR]);
DOF2_SetInt(String,"Sexo",DadosJogador[playerid][SEXO_JOGADOR]);
DOF2_SetInt(String,"Tutorial",DadosJogador[playerid][TUTORIAL_JOGADOR]);
DOF2_SetInt(String,"LicencaAero",DadosJogador[playerid][LIC_AERO_JOGADOR]);
DOF2_SetInt(String,"LicencaBarco",DadosJogador[playerid][LIC_BARCO_JOGADOR]);
DOF2_SetInt(String,"LicencaMoto",DadosJogador[playerid][LIC_MOTOS_JOGADOR]);
DOF2_SetInt(String,"LicencaCarro",DadosJogador[playerid][LIC_CARROS_JOGADOR]);
DOF2_SetInt(String,"LicencaCamOni",DadosJogador[playerid][LIC_CAMINHAO_ONIBUS_JOGADOR]);
DOF2_SetInt(String,"LicencaArma",DadosJogador[playerid][PORTE_ARMAS_JOGADOR]);
DOF2_SetInt(String,"EstiloLuta",DadosJogador[playerid][ESTILO_LUTA_JOGADOR]);
DOF2_SetInt(String,"Organizacao",DadosJogador[playerid][ORGANIZACAO_JOGADOR]);
DOF2_SetInt(String,"CargoORG",DadosJogador[playerid][CARGO_ORG_JOGADOR]);
DOF2_SetInt(String,"GPS",DadosJogador[playerid][GPS_DO_JOGADOR]);
DOF2_SetInt(String,"Banco",DadosJogador[playerid][CONTA_BANCO_JOGADOR]);
DOF2_SetInt(String,"Dinamites",DadosJogador[playerid][DINAMITE_JOGADOR]);
DOF2_SetInt(String,"NivelProcurado",DadosJogador[playerid][NIVEL_PROCURADO]);
DOF2_SetFloat(String, "X", 1971.4091);
DOF2_SetFloat(String, "Y", -1282.4092);
DOF2_SetFloat(String, "Z", 23.9844);
DOF2_SetFloat(String, "Angulo", 269.3677);
DOF2_SetInt(String, "Interior", DadosJogador[playerid][UltimoInterior]);
DOF2_SetInt(String,"Nascimento",DadosJogador[playerid][NASCIMENTO]);
DOF2_SaveFile();
}
return true;
}

OnPlayerSave(playerid);
public OnPlayerSave(playerid)
{
new vid = GetPlayerVehicleID(playerid);
format(String,sizeof(String),"cCONTAS/%s.ini",PlayerNick(playerid));
if(DOF2_FileExists(String) && JogadorLogado[playerid] == true)
{
DOF2_SetInt(String,"Dinheiro",GetPlayerMoney(playe rid));
DOF2_SetInt(String,"NivelAdmin",DadosJogador[playerid][ADMIN_NIVEL]);
DOF2_SetInt(String,"Matou",DadosJogador[playerid][JOGADOR_MATOU]);
DOF2_SetInt(String,"Morreu",DadosJogador[playerid][JOGADOR_MORREU]);
DOF2_SetInt(String,"SkinID",DadosJogador[playerid][SKIN_JOGADOR]);
DOF2_SetInt(String,"Level",DadosJogador[playerid][NIVEL_JOGADOR]);
DOF2_SetInt(String,"Respeito",DadosJogador[playerid][RESPEITO_JOGADOR]);
DOF2_SetInt(String,"Sexo",DadosJogador[playerid][SEXO_JOGADOR]);
DOF2_SetInt(String,"Tutorial",DadosJogador[playerid][TUTORIAL_JOGADOR]);
DOF2_SetInt(String,"LicencaAero",DadosJogador[playerid][LIC_AERO_JOGADOR]);
DOF2_SetInt(String,"LicencaBarco",DadosJogador[playerid][LIC_BARCO_JOGADOR]);
DOF2_SetInt(String,"LicencaMoto",DadosJogador[playerid][LIC_MOTOS_JOGADOR]);
DOF2_SetInt(String,"LicencaCarro",DadosJogador[playerid][LIC_CARROS_JOGADOR]);
DOF2_SetInt(String,"LicencaCamOni",DadosJogador[playerid][LIC_CAMINHAO_ONIBUS_JOGADOR]);
DOF2_SetInt(String,"LicencaArma",DadosJogador[playerid][PORTE_ARMAS_JOGADOR]);
DOF2_SetInt(String,"EstiloLuta",DadosJogador[playerid][ESTILO_LUTA_JOGADOR]);
DOF2_SetInt(String,"Organizacao",DadosJogador[playerid][ORGANIZACAO_JOGADOR]);
DOF2_SetInt(String,"CargoORG",DadosJogador[playerid][CARGO_ORG_JOGADOR]);
DOF2_SetInt(String,"GPS",DadosJogador[playerid][GPS_DO_JOGADOR]);
DOF2_SetInt(String,"Banco",DadosJogador[playerid][CONTA_BANCO_JOGADOR]);
DOF2_SetInt(String,"Dinamites",DadosJogador[playerid][DINAMITE_JOGADOR]);
DOF2_SetInt(String,"NivelProcurado",DadosJogador[playerid][NIVEL_PROCURADO]);
if(!BarcosLIC(vid) && !AeronavesLIC(vid))


Ai esta tudo certinho mas se eu nгo estou conseguindo montalo.
Reply


Messages In This Thread
como fazer para salvar na pasta contas - by tcharles2011 - 22.06.2017, 16:23
Re: como fazer para salvar na pasta contas - by DarkBr - 22.06.2017, 17:17
Re: como fazer para salvar na pasta contas - by tcharles2011 - 23.06.2017, 02:41
Re: como fazer para salvar na pasta contas - by tcharles2011 - 23.06.2017, 03:06
Re: como fazer para salvar na pasta contas - by JhonnyBR - 23.06.2017, 03:11
Re: como fazer para salvar na pasta contas - by tcharles2011 - 23.06.2017, 03:24
Re: como fazer para salvar na pasta contas - by tcharles2011 - 23.06.2017, 03:27
Re: como fazer para salvar na pasta contas - by MrEdu - 26.06.2017, 22:30

Forum Jump:


Users browsing this thread: 4 Guest(s)