[AJUDA] E aconselhбvel usar DINI Em RPG?
#1

seguinte galera passei todo meu sisteam de contas para Dini
mais estou tendo alguns problemas com ele
1є - O primeiro registra e loga automaticamente , apos desconetar se ele entrar
ele tenta logar normalmente mais ele nao spawna no local indicado para ele
2є - Quando uhm segundo player registra e tudo normal , mais se esse segundo
desconctar e quando ele tentar logar o Server para de responder os comandos
ate o player logar, apos ele se logar os comandos voltam a funcionar
( Causa lag nos comandos ao estar logando) mais o problema de spawn continua

----------------------------//------------------------------------
Vou Postar meu Sistema de Login
Ele usa 1 public e 2 Dialog
pawn Код:
// ------------------------------[ DIALOG ]------------------------------------
new string[256];
    new name[MAX_PLAYER_NAME], file[512], TextPass[256];
    if(dialogid == 1)
    {
        GetPlayerName(playerid, name, sizeof(name));
        if(response)
        {
            if(strlen(inputtext) == 0)
            {
                ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "{FFFFFF}Conta Nгo Registrada", "{CFCDCD}Olб para se {F50A0A}Registrar\n {CFCDCD}E sу digitar uma Senha", "Registrar", "Sair");
            }
            format(file, sizeof(file), "/Contas/%s.ini", name);
            if(!fexist(file))
            {
            //format(TextPass, sizeof(TextPass),"[BVO RPG]: Seja Bem Vindo ao Servidor! Atenзгo nunca esqueзa de sua senha(Pass: %s)", name, inputtext);
            SendClientMessage(playerid, BRANCO, TextPass);
//            format(arquivo, sizeof(arquivo), "Contas/%s.ini", name);
            dini_Create(file);
            dini_IntSet(file,"Password", inputtext);
            PlayerInfo[playerid][pCash] = GetPlayerMoneyEx(playerid);
        //----------------------------------------------------------
            dini_IntSet(file, "Level",PlayerInfo[playerid][pLevel] = 5);
            dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdmin] = 0);
            dini_IntSet(file, "DonateRank",PlayerInfo[playerid][pDonateRank] = 0);
            dini_IntSet(file, "UpgradePoints",PlayerInfo[playerid][gPupgrade] = 0);
            dini_IntSet(file, "ConnectedTime",PlayerInfo[playerid][pConnectTime] = 0);
            dini_IntSet(file, "Registered",PlayerInfo[playerid][pReg] = 0);
            dini_IntSet(file, "Sex",PlayerInfo[playerid][pSex] = 0);
            dini_IntSet(file, "Age",PlayerInfo[playerid][pAge] = 18);
            dini_IntSet(file, "Origin",PlayerInfo[playerid][pOrigin] = 1);
            dini_IntSet(file, "CK",PlayerInfo[playerid][pCK] = 0);
            dini_IntSet(file, "Muted",PlayerInfo[playerid][pMuted] = 0);
            dini_IntSet(file, "Respect",PlayerInfo[playerid][pExp] = 0);
            dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 0);
            dini_IntSet(file, "Bank",PlayerInfo[playerid][pAccount] = 150000);
            dini_IntSet(file, "Crimes",PlayerInfo[playerid][pCrimes] = 0);
            dini_IntSet(file, "Kills",PlayerInfo[playerid][pKills] = 0);
            dini_IntSet(file, "Deaths",PlayerInfo[playerid][pDeaths] = 0);
            dini_IntSet(file, "Arrested",PlayerInfo[playerid][pArrested] = 0);
            dini_IntSet(file, "WantedDeaths",PlayerInfo[playerid][pWantedDeaths] = 0);
            dini_IntSet(file, "Phonebook",PlayerInfo[playerid][pPhoneBook] = 0);
            dini_IntSet(file, "LottoNr",PlayerInfo[playerid][pLottoNr] = 0);
            dini_IntSet(file, "Fishes",PlayerInfo[playerid][pFishes] = 0);
            dini_IntSet(file, "BiggestFish",PlayerInfo[playerid][pBiggestFish] = 0);
            dini_IntSet(file, "Job",PlayerInfo[playerid][pJob] = 0);
            dini_IntSet(file, "Paycheck",PlayerInfo[playerid][pPayCheck] = 0);
            dini_IntSet(file, "HeadValue",PlayerInfo[playerid][pHeadValue] = 0);
            dini_IntSet(file, "Jailed",PlayerInfo[playerid][pJailed] = 0);
            dini_IntSet(file, "JailTime",PlayerInfo[playerid][pJailTime] = 0);
            dini_IntSet(file, "Materials",PlayerInfo[playerid][pMats] = 0);
            dini_IntSet(file, "Drugs",PlayerInfo[playerid][pDrugs] = 0);
            dini_IntSet(file, "Leader",PlayerInfo[playerid][pLeader] = 0);
            dini_IntSet(file, "Member",PlayerInfo[playerid][pMember] = 0);
            dini_IntSet(file, "FMember",PlayerInfo[playerid][pFMember] = 0);
            dini_IntSet(file, "Rank",PlayerInfo[playerid][pRank] = 0);
            dini_IntSet(file, "Char",PlayerInfo[playerid][pChar] = 0);
            dini_IntSet(file, "ContractTime",PlayerInfo[playerid][pContractTime] = 0);
            dini_IntSet(file, "DetSkill",PlayerInfo[playerid][pDetSkill] = 0);
            dini_IntSet(file, "SexSkill",PlayerInfo[playerid][pSexSkill] = 0);
            dini_IntSet(file, "BoxSkill",PlayerInfo[playerid][pBoxSkill] = 0);
            dini_IntSet(file, "LawSkill",PlayerInfo[playerid][pLawSkill] = 0);
            dini_IntSet(file, "MechSkill",PlayerInfo[playerid][pMechSkill] = 0);
            dini_IntSet(file, "JackSkill",PlayerInfo[playerid][pJackSkill] = 0);
            dini_IntSet(file, "CarSkill",PlayerInfo[playerid][pCarSkill] = 0);
            dini_IntSet(file, "NewsSkill",PlayerInfo[playerid][pNewsSkill] = 0);
            dini_IntSet(file, "DrugsSkill",PlayerInfo[playerid][pDrugsSkill] = 0);
            dini_IntSet(file, "CookSkill",PlayerInfo[playerid][pCookSkill] = 0);
            dini_IntSet(file, "FishSkill",PlayerInfo[playerid][pFishSkill] = 0);
            dini_FloatSet(file, "SHealth",PlayerInfo[playerid][pSHealth]);
            dini_FloatSet(file, "Health",PlayerInfo[playerid][pHealth] = 0);
            GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
            dini_IntSet(file, "Int",PlayerInfo[playerid][pInt] = 0);
            dini_IntSet(file, "Local",PlayerInfo[playerid][pLocal] = 0);
            dini_IntSet(file, "Team",PlayerInfo[playerid][pModel] = 0);
            new randphone = 1000 + random(9999);
            dini_IntSet(file, "PhoneNr",PlayerInfo[playerid][pPnumber] = randphone);
            dini_IntSet(file, "House",PlayerInfo[playerid][pPhousekey] = 0);
            dini_IntSet(file, "Bizz",PlayerInfo[playerid][pPbiskey] = 0);
            /*if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
            {
                PlayerInfo[playerid][pPos_x] = 1684.9;
                PlayerInfo[playerid][pPos_y] = -2244.5;
                PlayerInfo[playerid][pPos_z] = 13.5;
            }
            if(Spectate[playerid] != 255)
            {
                PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
                PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
                PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
                PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
                PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
            }*/

            dini_FloatSet(file, "Health",PlayerInfo[playerid][pHealth]);
            dini_FloatSet(file, "Posx",PlayerInfo[playerid][pPos_x]);
            dini_FloatSet(file, "fPosy",PlayerInfo[playerid][pPos_y]);
            dini_FloatSet(file, "Posz",PlayerInfo[playerid][pPos_z]);
            dini_IntSet(file, "CarLic",PlayerInfo[playerid][pCarLic] = 0);
            dini_IntSet(file, "BoatLic",PlayerInfo[playerid][pBoatLic] = 0);
            dini_IntSet(file, "FishLic",PlayerInfo[playerid][pFlyLic] = 0);
            dini_IntSet(file, "GunLic",PlayerInfo[playerid][pGunLic] = 0);
            dini_IntSet(file, "Gun1",PlayerInfo[playerid][pGun1] = 0);
            dini_IntSet(file, "Gun2",PlayerInfo[playerid][pGun2] = 0);
            dini_IntSet(file, "Gun3",PlayerInfo[playerid][pGun3] = 0);
            dini_IntSet(file, "Gun4",PlayerInfo[playerid][pGun4] = 0);
            dini_IntSet(file, "Ammo1",PlayerInfo[playerid][pAmmo1] = 0);
            dini_IntSet(file, "Ammo2",PlayerInfo[playerid][pAmmo2] = 0);
            dini_IntSet(file, "Ammo3",PlayerInfo[playerid][pAmmo3] = 0);
            dini_IntSet(file, "Ammo4",PlayerInfo[playerid][pAmmo4] = 0);
            dini_IntSet(file, "CarTime",PlayerInfo[playerid][pCarTime] = 0);
            dini_IntSet(file, "PayDay",PlayerInfo[playerid][pPayDay] = 0);
            dini_IntSet(file, "PayDayHad",PlayerInfo[playerid][pPayDayHad] = 0);
            dini_IntSet(file, "CDPlayer",PlayerInfo[playerid][pCDPlayer] = 0);
            dini_IntSet(file, "Wins",PlayerInfo[playerid][pWins] = 0);
            dini_IntSet(file, "Loses",PlayerInfo[playerid][pLoses] = 0);
            dini_IntSet(file, "AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk] = 0);
            dini_IntSet(file, "DrugPerk",PlayerInfo[playerid][pDrugPerk] = 0);
            dini_IntSet(file, "MiserPerk",PlayerInfo[playerid][pMiserPerk] = 0);
            dini_IntSet(file, "PainPerk",PlayerInfo[playerid][pPainPerk] = 0);
            dini_IntSet(file, "TraderPerk",PlayerInfo[playerid][pTraderPerk] = 0);
            dini_IntSet(file, "Tutorial",PlayerInfo[playerid][pTut] = 1);
            dini_IntSet(file, "Mission",PlayerInfo[playerid][pMissionNr] = 0);
            dini_IntSet(file, "Warnings",PlayerInfo[playerid][pWarns] = 0);
            dini_IntSet(file, "Adjustable",PlayerInfo[playerid][pAdjustable] = 0);
            dini_IntSet(file, "Fuel",PlayerInfo[playerid][pFuel] = 0);
            dini_IntSet(file, "Married",PlayerInfo[playerid][pMarried] = 0);
            //dini_IntSet(file, "MarriedTo",PlayerInfo[playerid][pMarriedTo] = Ninguem);
            dini_IntSet(file, "MarriedTo",PlayerInfo[playerid][pMarriedTo] = 0);
            dini_IntSet(file, "Maconha",PlayerInfo[playerid][pDrogas] = 0);
            dini_IntSet(file, "Cocaina",PlayerInfo[playerid][pDrogas2] = 0);
            dini_IntSet(file, "Crack",PlayerInfo[playerid][pDrogas3] = 0);
            dini_IntSet(file, "SafeMaconha",PlayerInfo[playerid][pSafeDrogas] = 0);
            dini_IntSet(file, "SafeCocaina",PlayerInfo[playerid][pSafeDrogas2] = 0);
            dini_IntSet(file, "SafeCrack",PlayerInfo[playerid][pSafeDrogas3] = 0);
            dini_IntSet(file, "SafeMateriais",PlayerInfo[playerid][psMats] = 0);
            gPlayerLogged[playerid] = 1;
            PlayerInfo[playerid][pTut] = 1;
            OnPlayerSaveConta(playerid);
            //SpawnPlayer(playerid);
            TogglePlayerSpectating( playerid , 1 );
            SendClientMessage(playerid, BRANCO, "Logado Automaticamente! Agora siga o Tutorial!");
            ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Brasil Vila Online RPG", "Escolha Seu Sexo Por Favor.\n Masculino й Homem!\n Feminino й Mulher!", "Masculino", "Femino");
            }
     }}
     if (dialogid == 2)
     {
        //new name[MAX_PLAYER_NAME];//, file[256];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file),"/Contas/%s.ini", name);
        if(!response){Kick(playerid);}
        if (!strlen(inputtext)){ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{F5F52E}Brasil {3EDE76}Vila {1E92F7}Online {F5F52E}RPG", "{F5F52E}Digite Sua Pass Para se Logar", "Logar", "Sair");}
        new tmp;
        tmp = dini_Int(file, "Password");
        if(inputtext != tmp)
        {
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{F5F52E}Brasil {3EDE76}Vila {1E92F7}Online {F5F52E}RPG", "{1E92F7}A senha digitada й incorreta \n{F5F52E}Digite Sua Pass Para se Logar!", "Logar", "Sair");
            return 1;
        }
        gPlayerLogged[playerid] = 1;
        OnPlayerLogin(playerid, inputtext);
        SpawnPlayer(playerid);
//      OnPlayerLogin(playerid, udb_hash(inputtext));
        /*if(response)
        {
        new stringX[512];
        new stringY[512];
        new playersip[64];
        GetPlayerIp(playerid,playersip,sizeof(playersip));
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), "/Contas/%s.ini", name);
        if(strlen(inputtext) == 0)
        {
            format(stringX, sizeof(stringX), "%s\n{F2F2F2}Nome: {F03333}%s\n", stringX,name);
            format(stringX, sizeof(stringX), "%s\n{F2F2F2}IP: {F03333}%s\n", stringX,playersip);
            format(stringX, sizeof(stringX), "%s\n{F2F2F2}Digite Sua {F03333}Senha{F2F2F2} Para se logar\n", stringX);
            format(stringX, sizeof(stringX), "%s\n{F2F2F2}OBS:Visite o Forum/Site Para ver as Atualizaзхes \n {F03333}www.brasilvilaonline.com", stringX);
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{F5F52E}Brasil {3EDE76}Vila {1E92F7}Online {F5F52E}RPG", stringX, "Logar", "Sair");
            return 0;
        }
        if(fexist(file))
        {
            new password = dini_Int(file, "Password");
            if(udb_hash(inputtext) != password)
            {
                SendClientMessage(playerid, COLOR_RED, "A SENHA DIGITADA NГO ESTA CORRETA! DIGITE NOVAMENTE");
                format(stringY, sizeof(stringY), "%s\n{F2F2F2}Nome: {F03333}%s\n", stringY,name);
                format(stringY, sizeof(stringY), "%s\n{F2F2F2}IP: {F03333}%s\n", stringY,playersip);
                format(stringY, sizeof(stringY), "%s\n{F2F2F2}Essa e Sua Conta?\n", stringY);
                format(stringY, sizeof(stringY), "%s\n{F2F2F2}Digite Sua {F03333}Senha{F2F2F2} Para se logar\n", stringY);
                format(stringY, sizeof(stringY), "%s\n{F2F2F2}OBS:Visite o Forum/Site Para ver as Atualizaзхes \n {F03333}www.brasilvilaonline.com", stringY);
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{F5F52E}Brasil {3EDE76}Vila {1E92F7}Online {F5F52E}R{3EDE76}P{1E92F7}G", stringY, "Logar", "Sair");
                return 1;
            }
            if(udb_hash(inputtext) == password)
            {
                 SpawnPlayer(playerid);
                 format(file, sizeof(file), "/Contas/%s.ini", name);
                 TogglePlayerSpectating( playerid , 0 );
                 PlayerInfo[playerid][pLevel] = dini_Int(file, "Level");
                 PlayerInfo[playerid][pAdmin] = dini_Int(file, "AdminLevel");
                 PlayerInfo[playerid][pDonateRank] = dini_Int(file, "DonateRank");
                 PlayerInfo[playerid][gPupgrade] = dini_Int(file, "UpgradePoints");
                 PlayerInfo[playerid][pConnectTime] = dini_Int(file, "ConnectedTime");
                 PlayerInfo[playerid][pReg] = dini_Int(file, "Registered");
                 PlayerInfo[playerid][pSex] = dini_Int(file, "Sex");
                 PlayerInfo[playerid][pAge] = dini_Int(file, "Age");
                 PlayerInfo[playerid][pOrigin] = dini_Int(file, "Origin");
                 PlayerInfo[playerid][pCK] = dini_Int(file, "CK");
                 PlayerInfo[playerid][pMuted] = dini_Int(file, "Muted");
                 PlayerInfo[playerid][pExp] = dini_Int(file, "Respect");
                 PlayerInfo[playerid][pCash] = dini_Int(file, "Money");
                 PlayerInfo[playerid][pAccount] = dini_Int(file, "Bank");
                 PlayerInfo[playerid][pCrimes] = dini_Int(file, "Crimes");
                 PlayerInfo[playerid][pKills] = dini_Int(file, "Kills");
                 PlayerInfo[playerid][pDeaths] = dini_Int(file, "Deaths");
                 PlayerInfo[playerid][pArrested] = dini_Int(file, "Arrested");
                 PlayerInfo[playerid][pWantedDeaths] = dini_Int(file, "WantedDeaths");
                 PlayerInfo[playerid][pPhoneBook] = dini_Int(file, "Phonebook");
                 PlayerInfo[playerid][pLottoNr] = dini_Int(file, "LottoNr");
                 PlayerInfo[playerid][pFishes] = dini_Int(file, "Fishes");
                 PlayerInfo[playerid][pBiggestFish] = dini_Int(file, "BiggestFish");
                 PlayerInfo[playerid][pJob] = dini_Int(file, "Job");
                 PlayerInfo[playerid][pPayCheck] = dini_Int(file, "Paycheck");
                 PlayerInfo[playerid][pHeadValue] = dini_Int(file, "HeadValue");
                 PlayerInfo[playerid][pJailed] = dini_Int(file, "Jailed");
                 PlayerInfo[playerid][pJailTime] = dini_Int(file, "JailTime");
                 PlayerInfo[playerid][pMats] = dini_Int(file, "Materials");
                 PlayerInfo[playerid][pDrugs] = dini_Int(file, "Drugs");
                 PlayerInfo[playerid][pLeader] = dini_Int(file, "Leader");
                 PlayerInfo[playerid][pMember] = dini_Int(file, "Member");
                 PlayerInfo[playerid][pFMember] = dini_Int(file, "FMember");
                 PlayerInfo[playerid][pRank] = dini_Int(file, "Rank");
                 PlayerInfo[playerid][pChar] = dini_Int(file, "Char");
                 PlayerInfo[playerid][pContractTime] = dini_Int(file, "ContractTime");
                 PlayerInfo[playerid][pDetSkill] = dini_Int(file, "DetSkill");
                 PlayerInfo[playerid][pSexSkill] = dini_Int(file, "SexSkill");
                 PlayerInfo[playerid][pBoxSkill] = dini_Int(file, "BoxSkill");
                 PlayerInfo[playerid][pLawSkill] = dini_Int(file, "LawSkill");
                 PlayerInfo[playerid][pMechSkill] = dini_Int(file, "MechSkill");
                 PlayerInfo[playerid][pJackSkill] = dini_Int(file, "JackSkill");
                 PlayerInfo[playerid][pCarSkill] = dini_Int(file, "CarSkill");
                 PlayerInfo[playerid][pNewsSkill] = dini_Int(file, "NewsSkill");
                 PlayerInfo[playerid][pDrugsSkill] = dini_Int(file, "DrugsSkill");
                 PlayerInfo[playerid][pCookSkill] = dini_Int(file, "CookSkill");
                 PlayerInfo[playerid][pFishSkill] = dini_Int(file, "FishSkill");
                 PlayerInfo[playerid][pSHealth] = dini_Int(file, "SHealth");
                 PlayerInfo[playerid][pHealth] = dini_Int(file, "Health");
                 PlayerInfo[playerid][pInt] = dini_Int(file, "Int");
                 PlayerInfo[playerid][pLocal] = dini_Int(file, "Local");
                 PlayerInfo[playerid][pTeam] = dini_Int(file, "Team");
                 PlayerInfo[playerid][pModel] = dini_Int(file, "Model");
                 PlayerInfo[playerid][pPnumber] = dini_Int(file, "PhoneNr");
                 PlayerInfo[playerid][pPhousekey] = dini_Int(file, "House");
                 PlayerInfo[playerid][pPbiskey] = dini_Int(file, "Bizz");
                 PlayerInfo[playerid][pPos_x] = dini_Int(file, "Posx");
                 PlayerInfo[playerid][pPos_y] = dini_Int(file, "Posy");
                 PlayerInfo[playerid][pPos_z] = dini_Int(file, "Posz");
                 PlayerInfo[playerid][pCarLic] = dini_Int(file, "CarLic");
                 PlayerInfo[playerid][pFlyLic] = dini_Int(file, "FlyLic");
                 PlayerInfo[playerid][pBoatLic] = dini_Int(file, "BoatLic");
                 PlayerInfo[playerid][pFishLic] = dini_Int(file, "FishLic");
                 PlayerInfo[playerid][pGunLic] = dini_Int(file, "GunLic");
                 PlayerInfo[playerid][pGun1] = dini_Int(file, "Gun1");
                 PlayerInfo[playerid][pGun2] = dini_Int(file, "Gun2");
                 PlayerInfo[playerid][pGun3] = dini_Int(file, "Gun3");
                 PlayerInfo[playerid][pGun4] = dini_Int(file, "Gun4");
                 PlayerInfo[playerid][pAmmo1] = dini_Int(file, "Ammo1");
                 PlayerInfo[playerid][pAmmo2] = dini_Int(file, "Ammo2");
                 PlayerInfo[playerid][pAmmo3] = dini_Int(file, "Ammo3");
                 PlayerInfo[playerid][pAmmo4] = dini_Int(file, "Ammo4");
                 PlayerInfo[playerid][pCarTime] = dini_Int(file, "CarTime");
                 PlayerInfo[playerid][pPayDay] = dini_Int(file, "PayDay");
                 PlayerInfo[playerid][pPayDayHad] = dini_Int(file, "PayDayHad");
                 PlayerInfo[playerid][pCDPlayer] = dini_Int(file, "CDPlayer");
                 PlayerInfo[playerid][pWins] = dini_Int(file, "Wins");
                 PlayerInfo[playerid][pLoses] = dini_Int(file, "Loses");
                 PlayerInfo[playerid][pAlcoholPerk] = dini_Int(file, "AlcoholPerk");
                 PlayerInfo[playerid][pDrugPerk] = dini_Int(file, "DrugPerk");
                 PlayerInfo[playerid][pMiserPerk] = dini_Int(file, "MiserPerk");
                 PlayerInfo[playerid][pPainPerk] = dini_Int(file, "PainPerk");
                 PlayerInfo[playerid][pTraderPerk] = dini_Int(file, "TraderPerk");
                 PlayerInfo[playerid][pTut] = dini_Int(file, "Tutorial");
                 PlayerInfo[playerid][pMissionNr] = dini_Int(file, "Mission");
                 PlayerInfo[playerid][pWarns] = dini_Int(file, "Warnings");
                 PlayerInfo[playerid][pAdjustable] = dini_Int(file, "Adjustable");
                 PlayerInfo[playerid][pFuel] = dini_Int(file, "Fuel");
                 PlayerInfo[playerid][pMarried] = dini_Int(file, "Married");
                 PlayerInfo[playerid][pMarriedTo] = dini_Int(file, "MarriedTo");
                 PlayerInfo[playerid][pDrogas] = dini_Int(file, "Maconha");
                 PlayerInfo[playerid][pDrogas2] = dini_Int(file, "Cocaina");
                 PlayerInfo[playerid][pDrogas3] = dini_Int(file, "Crack");
                 PlayerInfo[playerid][pSafeDrogas] = dini_Int(file, "SafeMaconha");
                 PlayerInfo[playerid][pSafeDrogas2] = dini_Int(file, "SafeCocaina");
                 PlayerInfo[playerid][pSafeDrogas3] = dini_Int(file, "SafeCrack");
                 PlayerInfo[playerid][psMats] = dini_Int(file, "SafeMateriais");
                 gPlayerLogged[playerid] = 1;
                 OnPlayerSaveConta(playerid);
                 SetPlayerSpawn(playerid);
                 new string2[128];
                 new tmp2[128];
                 format(string2, sizeof(string2), "SERVER: Bem Vindo %s",name);
                 SendClientMessage(playerid, COLOR_WHITE,string2);
                 printf("%s esta logado no Servidor.",name);
                 format(tmp2, sizeof(tmp2), "~w~Bem Vindo ~n~~y~   %s", name);
                 GameTextForPlayer(playerid, tmp2, 5000, 1);
                 //SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
            }}}
        }*/

        //return 1;
    }

// -----------------------------------[ ONPLAYERCONNECT ]-------------------------
new playersip[64];
    new string[256];
    GetPlayerIp(playerid,playersip,sizeof(playersip));
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), "/Contas/%s.ini", name);
    //if (!dini_Exists(file))
    if (!fexist(file))
    {
        format(string, sizeof(string), "%s\n{F2F2F2}Nome: {F03333}%s\n", string,name);
        format(string, sizeof(string), "%s\n{F2F2F2}IP: {F03333}%s\n", string,playersip);
        format(string, sizeof(string), "%s\n{F2F2F2}Deseja {F03333}Registrar{F2F2F2} essa Conta? \n Digite uma Senha e Prossiga", string);
        format(string, sizeof(string), "%s\n{F2F2F2}OBS: {F03333}Registre-se{F2F2F2} tambem no Forum \n {F03333}www.brasilvilaonline.com", string);
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "{F5F52E}Brasil {3EDE76}Vila {1E92F7}Online {F5F52E}R{3EDE76}P{1E92F7}G", string, "Registrar", "Sair");
        TogglePlayerSpectating( playerid , 1 );
    }
    if(fexist(file))
    {
        format(string, sizeof(string), "%s\n{F2F2F2}Nome: {F03333}%s\n", string,name);
        format(string, sizeof(string), "%s\n{F2F2F2}IP: {F03333}%s\n", string,playersip);
        format(string, sizeof(string), "%s\n{F2F2F2}Essa e Sua Conta?\n", string);
        format(string, sizeof(string), "%s\n{F2F2F2}Digite Sua {F03333}Senha{F2F2F2} Para se logar\n", string);
        format(string, sizeof(string), "%s\n{F2F2F2}OBS:Visite o Forum/Site Para ver as Atualizaзхes \n {F03333}www.brasilvilaonline.com", string);
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{F5F52E}Brasil {3EDE76}Vila {1E92F7}Online {F5F52E}R{3EDE76}P{1E92F7}G", string, "Logar", "Sair");
    }
//-------------------------------------------[ Public para salvar contas ] -----------------------
public OnPlayerSaveConta(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] >= 1)
        {
            new playername3[MAX_PLAYER_NAME], file[256];
            GetPlayerName(playerid, playername3, sizeof(playername3));
            //format(string3, sizeof(string3), "Contas/%s.ini", playername3);
            format(file, sizeof(file), "/Contas/%s.ini", playername3);
            PlayerInfo[playerid][pCash] = GetPlayerMoneyEx(playerid);
            dini_IntSet(file, "Password",PlayerInfo[playerid][pKey]);
            //--------------------------------------------------
            dini_IntSet(file, "Level",PlayerInfo[playerid][pLevel]);
            dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdmin]);
            dini_IntSet(file, "DonateRank",PlayerInfo[playerid][pDonateRank]);
            dini_IntSet(file, "UpgradePoints",PlayerInfo[playerid][gPupgrade]);
            dini_IntSet(file, "ConnectedTime",PlayerInfo[playerid][pConnectTime]);
            dini_IntSet(file, "Registered",PlayerInfo[playerid][pReg]);
            dini_IntSet(file, "Sex",PlayerInfo[playerid][pSex]);
            dini_IntSet(file, "Origin",PlayerInfo[playerid][pOrigin]);
            dini_IntSet(file, "CK",PlayerInfo[playerid][pCK]);
            dini_IntSet(file, "Muted",PlayerInfo[playerid][pMuted]);
            dini_IntSet(file, "Respect",PlayerInfo[playerid][pExp]);
            dini_IntSet(file, "Money",PlayerInfo[playerid][pCash]);
            dini_IntSet(file, "Bank",PlayerInfo[playerid][pAccount]);
            dini_IntSet(file, "Crimes",PlayerInfo[playerid][pCrimes]);
            dini_IntSet(file, "Kills",PlayerInfo[playerid][pKills]);
            dini_IntSet(file, "Deaths",PlayerInfo[playerid][pDeaths]);
            dini_IntSet(file, "Arrested",PlayerInfo[playerid][pArrested]);
            dini_IntSet(file, "WantedDeaths",PlayerInfo[playerid][pWantedDeaths]);
            dini_IntSet(file, "Phonebook",PlayerInfo[playerid][pPhoneBook]);
            dini_IntSet(file, "LottoNr",PlayerInfo[playerid][pLottoNr]);
            dini_IntSet(file, "Fishes",PlayerInfo[playerid][pFishes]);
            dini_IntSet(file, "BiggestFish",PlayerInfo[playerid][pBiggestFish]);
            dini_IntSet(file, "Job",PlayerInfo[playerid][pJob]);
            dini_IntSet(file, "Paycheck",PlayerInfo[playerid][pPayCheck]);
            dini_IntSet(file, "HeadValue",PlayerInfo[playerid][pHeadValue]);
            dini_IntSet(file, "Jailed",PlayerInfo[playerid][pJailed]);
            dini_IntSet(file, "JailTime",PlayerInfo[playerid][pJailTime]);
            dini_IntSet(file, "Materials",PlayerInfo[playerid][pMats]);
            dini_IntSet(file, "Drugs",PlayerInfo[playerid][pDrugs]);
            dini_IntSet(file, "Leader",PlayerInfo[playerid][pLeader]);
            dini_IntSet(file, "Member",PlayerInfo[playerid][pMember]);
            dini_IntSet(file, "FMember",PlayerInfo[playerid][pFMember]);
            dini_IntSet(file, "Rank",PlayerInfo[playerid][pRank]);
            dini_IntSet(file, "Char",PlayerInfo[playerid][pChar]);
            dini_IntSet(file, "ContractTime",PlayerInfo[playerid][pContractTime]);
            dini_IntSet(file, "DetSkill",PlayerInfo[playerid][pDetSkill]);
            dini_IntSet(file, "SexSkill",PlayerInfo[playerid][pSexSkill]);
            dini_IntSet(file, "BoxSkill",PlayerInfo[playerid][pBoxSkill]);
            dini_IntSet(file, "LawSkill",PlayerInfo[playerid][pLawSkill]);
            dini_IntSet(file, "MechSkill",PlayerInfo[playerid][pMechSkill]);
            dini_IntSet(file, "JackSkill",PlayerInfo[playerid][pJackSkill]);
            dini_IntSet(file, "CarSkill",PlayerInfo[playerid][pCarSkill]);
            dini_IntSet(file, "NewsSkill",PlayerInfo[playerid][pNewsSkill]);
            dini_IntSet(file, "DrugsSkill",PlayerInfo[playerid][pDrugsSkill]);
            dini_IntSet(file, "CookSkill",PlayerInfo[playerid][pCookSkill]);
            dini_IntSet(file, "FishSkill",PlayerInfo[playerid][pFishSkill]);
            dini_FloatSet(file, "SHealth",PlayerInfo[playerid][pSHealth]);
            //------------------------------------------------------
            //GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
            //------------------------------------------------------
            dini_FloatSet(file, "Health",PlayerInfo[playerid][pHealth]);
            dini_IntSet(file, "Int",PlayerInfo[playerid][pInt]);
            dini_IntSet(file, "Local",PlayerInfo[playerid][pLocal]);
            dini_IntSet(file, "Team",PlayerInfo[playerid][pTeam]);
            dini_IntSet(file, "Model",PlayerInfo[playerid][pModel]);
            dini_IntSet(file, "PhoneNr",PlayerInfo[playerid][pPnumber]);
            dini_IntSet(file, "House",PlayerInfo[playerid][pPhousekey]);
            dini_IntSet(file, "Bizz",PlayerInfo[playerid][pPbiskey]);
            dini_FloatSet(file, "Health",PlayerInfo[playerid][pHealth]);
            dini_FloatSet(file, "Posx",PlayerInfo[playerid][pPos_x]);
            dini_FloatSet(file, "fPosy",PlayerInfo[playerid][pPos_y]);
            dini_FloatSet(file, "Posz",PlayerInfo[playerid][pPos_z]);
            dini_IntSet(file, "CarLic",PlayerInfo[playerid][pCarLic]);
            dini_IntSet(file, "FlyLic",PlayerInfo[playerid][pFlyLic]);
            dini_IntSet(file, "BoatLic",PlayerInfo[playerid][pBoatLic]);
            dini_IntSet(file, "FishLic",PlayerInfo[playerid][pFishLic]);
            dini_IntSet(file, "GunLic",PlayerInfo[playerid][pGunLic]);
            dini_IntSet(file, "Gun1",PlayerInfo[playerid][pGun1]);
            dini_IntSet(file, "Gun2",PlayerInfo[playerid][pGun2]);
            dini_IntSet(file, "Gun3",PlayerInfo[playerid][pGun3]);
            dini_IntSet(file, "Gun4",PlayerInfo[playerid][pGun4]);
            dini_IntSet(file, "Ammo1",PlayerInfo[playerid][pAmmo1]);
            dini_IntSet(file, "Ammo2",PlayerInfo[playerid][pAmmo2]);
            dini_IntSet(file, "Ammo3",PlayerInfo[playerid][pAmmo3]);
            dini_IntSet(file, "Ammo4",PlayerInfo[playerid][pAmmo4]);
            dini_IntSet(file, "CarTime",PlayerInfo[playerid][pCarTime]);
            dini_IntSet(file, "PayDay",PlayerInfo[playerid][pPayDay]);
            dini_IntSet(file, "PayDayHad",PlayerInfo[playerid][pPayDayHad]);
            dini_IntSet(file, "CDPlayer",PlayerInfo[playerid][pCDPlayer]);
            dini_IntSet(file, "Wins",PlayerInfo[playerid][pWins]);
            dini_IntSet(file, "Loses",PlayerInfo[playerid][pLoses]);
            dini_IntSet(file, "AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
            dini_IntSet(file, "DrugPerk",PlayerInfo[playerid][pDrugPerk]);
            dini_IntSet(file, "MiserPerk",PlayerInfo[playerid][pMiserPerk]);
            dini_IntSet(file, "PainPerk",PlayerInfo[playerid][pPainPerk]);
            dini_IntSet(file, "TraderPerk",PlayerInfo[playerid][pTraderPerk]);
            dini_IntSet(file, "Tutorial",PlayerInfo[playerid][pTut]);
            dini_IntSet(file, "Mission",PlayerInfo[playerid][pMissionNr]);
            dini_IntSet(file, "Warnings",PlayerInfo[playerid][pWarns]);
            dini_IntSet(file, "Adjustable",PlayerInfo[playerid][pAdjustable]);
            //----------------------------------------------------------------------------
            if(PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
            //----------------------------------------------------------------------------
            dini_IntSet(file, "Fuel",PlayerInfo[playerid][pFuel]);
            dini_IntSet(file, "Married",PlayerInfo[playerid][pMarried]);
            dini_IntSet(file, "MarriedTo",PlayerInfo[playerid][pMarriedTo]);
            dini_IntSet(file, "Maconha",PlayerInfo[playerid][pDrogas]);
            dini_IntSet(file, "Cocaina",PlayerInfo[playerid][pDrogas2]);
            dini_IntSet(file, "Crack",PlayerInfo[playerid][pDrogas3]);
            dini_IntSet(file, "SafeMaconha",PlayerInfo[playerid][pSafeDrogas]);
            dini_IntSet(file, "SafeCocaina",PlayerInfo[playerid][pSafeDrogas2]);
            dini_IntSet(file, "SafeCrack",PlayerInfo[playerid][pSafeDrogas3]);
            dini_IntSet(file, "SafeMateriais",PlayerInfo[playerid][psMats]);
        }
    }
    return 1;
}
//---------------------------[ PUBLIC DE LOGIN ]-----------------------------------
public OnPlayerLogin(playerid,password[])
{
    new tmp2[256];
    new string2[64];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Contas/%s.ini", playername2);
    new file[256];
    format(file, sizeof(file),"/Contas/%s.ini", playername2);
    if (dini_Exists(string2))
    {
         PlayerInfo[playerid][pKey] = dini_Int(file, "Password");
         PlayerInfo[playerid][pLevel] = dini_Int(file, "Level");
         PlayerInfo[playerid][pAdmin] = dini_Int(file, "AdminLevel");
         PlayerInfo[playerid][pDonateRank] = dini_Int(file, "DonateRank");
         PlayerInfo[playerid][gPupgrade] = dini_Int(file, "UpgradePoints");
         PlayerInfo[playerid][pConnectTime] = dini_Int(file, "ConnectedTime");
         PlayerInfo[playerid][pReg] = dini_Int(file, "Registered");
         PlayerInfo[playerid][pSex] = dini_Int(file, "Sex");
         PlayerInfo[playerid][pAge] = dini_Int(file, "Age");
         PlayerInfo[playerid][pOrigin] = dini_Int(file, "Origin");
         PlayerInfo[playerid][pCK] = dini_Int(file, "CK");
         PlayerInfo[playerid][pMuted] = dini_Int(file, "Muted");
         PlayerInfo[playerid][pExp] = dini_Int(file, "Respect");
         PlayerInfo[playerid][pCash] = dini_Int(file, "Money");
         PlayerInfo[playerid][pAccount] = dini_Int(file, "Bank");
         PlayerInfo[playerid][pCrimes] = dini_Int(file, "Crimes");
         PlayerInfo[playerid][pKills] = dini_Int(file, "Kills");
         PlayerInfo[playerid][pDeaths] = dini_Int(file, "Deaths");
         PlayerInfo[playerid][pArrested] = dini_Int(file, "Arrested");
         PlayerInfo[playerid][pWantedDeaths] = dini_Int(file, "WantedDeaths");
         PlayerInfo[playerid][pPhoneBook] = dini_Int(file, "Phonebook");
         PlayerInfo[playerid][pLottoNr] = dini_Int(file, "LottoNr");
         PlayerInfo[playerid][pFishes] = dini_Int(file, "Fishes");
         PlayerInfo[playerid][pBiggestFish] = dini_Int(file, "BiggestFish");
         PlayerInfo[playerid][pJob] = dini_Int(file, "Job");
         PlayerInfo[playerid][pPayCheck] = dini_Int(file, "Paycheck");
         PlayerInfo[playerid][pHeadValue] = dini_Int(file, "HeadValue");
         PlayerInfo[playerid][pJailed] = dini_Int(file, "Jailed");
         PlayerInfo[playerid][pJailTime] = dini_Int(file, "JailTime");
         PlayerInfo[playerid][pMats] = dini_Int(file, "Materials");
         PlayerInfo[playerid][pDrugs] = dini_Int(file, "Drugs");
         PlayerInfo[playerid][pLeader] = dini_Int(file, "Leader");
         PlayerInfo[playerid][pMember] = dini_Int(file, "Member");
         PlayerInfo[playerid][pFMember] = dini_Int(file, "FMember");
         PlayerInfo[playerid][pRank] = dini_Int(file, "Rank");
         PlayerInfo[playerid][pChar] = dini_Int(file, "Char");
         PlayerInfo[playerid][pContractTime] = dini_Int(file, "ContractTime");
         PlayerInfo[playerid][pDetSkill] = dini_Int(file, "DetSkill");
         PlayerInfo[playerid][pSexSkill] = dini_Int(file, "SexSkill");
         PlayerInfo[playerid][pBoxSkill] = dini_Int(file, "BoxSkill");
         PlayerInfo[playerid][pLawSkill] = dini_Int(file, "LawSkill");
         PlayerInfo[playerid][pMechSkill] = dini_Int(file, "MechSkill");
         PlayerInfo[playerid][pJackSkill] = dini_Int(file, "JackSkill");
         PlayerInfo[playerid][pCarSkill] = dini_Int(file, "CarSkill");
         PlayerInfo[playerid][pNewsSkill] = dini_Int(file, "NewsSkill");
         PlayerInfo[playerid][pDrugsSkill] = dini_Int(file, "DrugsSkill");
         PlayerInfo[playerid][pCookSkill] = dini_Int(file, "CookSkill");
         PlayerInfo[playerid][pFishSkill] = dini_Int(file, "FishSkill");
         PlayerInfo[playerid][pSHealth] = dini_Int(file, "SHealth");
         PlayerInfo[playerid][pHealth] = dini_Int(file, "Health");
         PlayerInfo[playerid][pInt] = dini_Int(file, "Int");
         PlayerInfo[playerid][pLocal] = dini_Int(file, "Local");
         PlayerInfo[playerid][pTeam] = dini_Int(file, "Team");
         PlayerInfo[playerid][pModel] = dini_Int(file, "Model");
         PlayerInfo[playerid][pPnumber] = dini_Int(file, "PhoneNr");
         PlayerInfo[playerid][pPhousekey] = dini_Int(file, "House");
         PlayerInfo[playerid][pPbiskey] = dini_Int(file, "Bizz");
         PlayerInfo[playerid][pPos_x] = dini_Int(file, "Posx");
         PlayerInfo[playerid][pPos_y] = dini_Int(file, "Posy");
         PlayerInfo[playerid][pPos_z] = dini_Int(file, "Posz");
         PlayerInfo[playerid][pCarLic] = dini_Int(file, "CarLic");
         PlayerInfo[playerid][pFlyLic] = dini_Int(file, "FlyLic");
         PlayerInfo[playerid][pBoatLic] = dini_Int(file, "BoatLic");
         PlayerInfo[playerid][pFishLic] = dini_Int(file, "FishLic");
         PlayerInfo[playerid][pGunLic] = dini_Int(file, "GunLic");
         PlayerInfo[playerid][pGun1] = dini_Int(file, "Gun1");
         PlayerInfo[playerid][pGun2] = dini_Int(file, "Gun2");
         PlayerInfo[playerid][pGun3] = dini_Int(file, "Gun3");
         PlayerInfo[playerid][pGun4] = dini_Int(file, "Gun4");
         PlayerInfo[playerid][pAmmo1] = dini_Int(file, "Ammo1");
         PlayerInfo[playerid][pAmmo2] = dini_Int(file, "Ammo2");
         PlayerInfo[playerid][pAmmo3] = dini_Int(file, "Ammo3");
         PlayerInfo[playerid][pAmmo4] = dini_Int(file, "Ammo4");
         PlayerInfo[playerid][pCarTime] = dini_Int(file, "CarTime");
         PlayerInfo[playerid][pPayDay] = dini_Int(file, "PayDay");
         PlayerInfo[playerid][pPayDayHad] = dini_Int(file, "PayDayHad");
         PlayerInfo[playerid][pCDPlayer] = dini_Int(file, "CDPlayer");
         PlayerInfo[playerid][pWins] = dini_Int(file, "Wins");
         PlayerInfo[playerid][pLoses] = dini_Int(file, "Loses");
         PlayerInfo[playerid][pAlcoholPerk] = dini_Int(file, "AlcoholPerk");
         PlayerInfo[playerid][pDrugPerk] = dini_Int(file, "DrugPerk");
         PlayerInfo[playerid][pMiserPerk] = dini_Int(file, "MiserPerk");
         PlayerInfo[playerid][pPainPerk] = dini_Int(file, "PainPerk");
         PlayerInfo[playerid][pTraderPerk] = dini_Int(file, "TraderPerk");
         PlayerInfo[playerid][pTut] = dini_Int(file, "Tutorial");
         PlayerInfo[playerid][pMissionNr] = dini_Int(file, "Mission");
         PlayerInfo[playerid][pWarns] = dini_Int(file, "Warnings");
         PlayerInfo[playerid][pAdjustable] = dini_Int(file, "Adjustable");
         PlayerInfo[playerid][pFuel] = dini_Int(file, "Fuel");
         PlayerInfo[playerid][pMarried] = dini_Int(file, "Married");
         PlayerInfo[playerid][pMarriedTo] = dini_Int(file, "MarriedTo");
         PlayerInfo[playerid][pDrogas] = dini_Int(file, "Maconha");
         PlayerInfo[playerid][pDrogas2] = dini_Int(file, "Cocaina");
         PlayerInfo[playerid][pDrogas3] = dini_Int(file, "Crack");
         PlayerInfo[playerid][pSafeDrogas] = dini_Int(file, "SafeMaconha");
         PlayerInfo[playerid][pSafeDrogas2] = dini_Int(file, "SafeCocaina");
         PlayerInfo[playerid][pSafeDrogas3] = dini_Int(file, "SafeCrack");
         PlayerInfo[playerid][psMats] = dini_Int(file, "SafeMateriais");
         PlayerCarregarBan(playerid);
         SpawnPlayer(playerid);
    }
    else
    {
         new loginstring[450];
         new loginname[MAX_PLAYER_NAME];
         GetPlayerName(playerid,loginname,sizeof(loginname));
         gPlayerLogTries[playerid] += 1;
         if(gPlayerLogTries[playerid] == 4) { SendClientMessage(playerid, COLOR_YELLOW, "Banido por Errar a Senha 4 Vezes.");Kick(playerid); }
         format(loginstring,sizeof(loginstring),"%s Seja Bem Vindo ao\nBrasil Vila Online RPG \n Digite sua Senha para Logar!\nSenha Incorreta tente Novamente!",loginname);
         ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", loginstring, "Logar", "Sair");
         return 1;
     }
         PlayerInfo[playerid][pAdjustable] = 0;
         ResetPlayerMoneyEx(playerid);
         ConsumingMoney[playerid] = 1;
         GivePlayerMoneyEx(playerid,PlayerInfo[playerid][pCash]);
         CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
        format(string2, sizeof(string2), "SERVER: Bem Vindo %s",playername2);
        SendClientMessage(playerid, COLOR_WHITE,string2);
        printf("%s esta logado no Servidor.",playername2);
        SpawnPlayer(playerid);
        //SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
        if(gTeam[playerid] == 0)
        {
            gTeam[playerid] = 3;
        }
        else
        {
            gTeam[playerid] = PlayerInfo[playerid][pTeam];
        }
        gPlayerLogged[playerid] = 1;
        if(gPlayerLogged[playerid] == 1)
        {
            SpawnPlayer(playerid);
        }
        format(tmp2, sizeof(tmp2), "~w~Bem Vindo ~n~~y~   %s", playername2);
        DateProp(playerid);
        GameTextForPlayer(playerid, tmp2, 5000, 1);
        SendClientMessage(playerid, COLOR_YELLOW, motd);
        TogglePlayerSpectating( playerid , 0 );
        SpawnPlayer(playerid);
    return 1;
}
// ------------------------------------- [ ONPLAYERSPAWN  ]---------------------
new name[MAX_PLAYER_NAME],file[256];
    new playersip[64];
if(gPlayerLogged[playerid] == 0)
    {
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), "/Contas/%s.ini", name);
    if (!dini_Exists(file))
    {
        format(string, sizeof(string), "%s\n{F2F2F2}Nome: {F03333}%s\n", string,name);
        format(string, sizeof(string), "%s\n{F2F2F2}IP: {F03333}%s\n", string,playersip);
        format(string, sizeof(string), "%s\n{F2F2F2}Deseja {F03333}Registrar{F2F2F2} essa Conta? \n Digite uma Senha e Prossiga", string);
        format(string, sizeof(string), "%s\n{F2F2F2}OBS: {F03333}Registre-se{F2F2F2} tambem no Forum \n {F03333}www.brasilvilaonline.com", string);
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "{F5F52E}Brasil {3EDE76}Vila {1E92F7}Online {F5F52E}RPG", string, "Registrar", "Sair");
    }
    if(fexist(file))
    {
        format(string, sizeof(string), "%s\n{F2F2F2}Nome: {F03333}%s\n", string,name);
        format(string, sizeof(string), "%s\n{F2F2F2}IP: {F03333}%s\n", string,playersip);
        format(string, sizeof(string), "%s\n{F2F2F2}Digite Sua {F03333}Senha{F2F2F2} Para se logar\n", string);
        format(string, sizeof(string), "%s\n{F2F2F2}OBS:Visite o Forum/Site Para ver as Atualizaзхes \n {F03333}www.brasilvilaonline.com", string);
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{F5F52E}Brasil {3EDE76}Vila {1E92F7}Online {F5F52E}RPG", string, "Logar", "Sair");
    }
    }
Reply
#2

Mais de 40 players = DESACONSELHADO !
Menos de 40 aconselhбvel.



Use SII , prбtico, fбcil e rбpido.
Reply
#3

Onde que tem esta forma de salvamento, SII ?

Posta o link por favor, Ricop522.
Reply
#4

e essa famosa leitura e escrita aqui e aconcelhavel tambem?
pawn Код:
format(var, 32, "Mission=%d\n",PlayerInfo[playerid][pMissionNr]);fwrite(hFile, var);
                format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
                format(var, 32, "Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
??(Isso alie so um exemplo )
Reply
#5

SII > https://sampforum.blast.hk/showthread.php?tid=58458
hitachi usa y_ini luxurion fez um tutorial de como usar й rбpido e bom.
Reply
#6

[S]trong, o topico do Fini й este aqui mesmo: http://forum.sa-mp.com/showthread.ph...highlight=Fini ?

E Fini й uma include, nй ? '-'
Reply
#7

E desde quando SII й fini?
Reply
#8

E eu falei que SII й Fini ?

Sу perguntei se aquele ali era o topico do Fini.

OBS: Valeu pelo link do SII, estou vendo aqui os sistemas de salvamento.
Reply
#9

@hitachi

Sim й ъtil e rбpido tambйm porйm nгo й prбtico e as vezes se vocк colocar para pular linha ele nгo pula.

Y_INI й chato e horrнvel pra se usar, tem esse negуcio de parsefile, e aqui o meu GM nгo compilo porque tem muitas coisas para salvar.

Fini Bom para poucos salvamentos, porйm possui muitos bugs, pode ter certeza. E se o seu sistema de salvamento ter mtas variaveis, vai fuder...


SII Muito bom, prбtico e rбpido ( ok existem mais rбpido, mais ele й top dos rбpidos tambйm. )
Reply
#10

@hitach se a intenзгo for velocidade e praticidade existe o DOF2.
DOF2 > http://forum.sa-mp.com/showthread.ph...highlight=DOF2
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)