[Ajuda] salvar interior
#1

queria uma ajuda aqui , tenho um gm aqui que quando der /mudarcasa ele muda o interior , e fica sу que quando der gmx o interior que o dono colocou nao salva , ele volta para o que veio na compra
Reply
#2

Poste o cуdigo do /mudarcasa ou faзa um salvamento '-'
Reply
#3

Mano aprende uma coisa, nуs nгo somos adivinhas para adivinhar o seu cуdigo!
Reply
#4

Posta o comando /mudarcasa
e posta o salvamento delas por Favor
Reply
#5

if(strcmp(cmd,"/mudarcasa",true)==0)
{
new House = PlayerDados[playerid][pPHousekey];
GetPlayerName(playerid, playername, sizeof(playername));
if (House != 9999 && strcmp(playername, HouseInfo[PlayerDados[playerid][pPHousekey]][hOwner], true) == 0)
{
tmp = strtok(cmdtext, idx);
if(HouseEntered[playerid] != 9999)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode usar esse comando dentro de uma casa");
return 1;
}
if(GetPlayerMoneyEx(playerid) < 1000)
{
SendClientMessage(playerid, COLOR_GRAD5, "Vocк nгo tem dinheiro suficiente R$1000");
return 1;
}
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GREY,"USE: /mudarcasa [1 a 15]");
return 1;
}
new idcasa = strval(tmp);
switch (idcasa)
{
case 1:
{
HouseInfo[House][hExitx] = 2467.4951;
HouseInfo[House][hExity] = -1698.4037;
HouseInfo[House][hExitz] = 1013.5078;
HouseInfo[House][hInt] = 2;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 1.");
}
case 2:
{
HouseInfo[House][hExitx] = 318.5972;
HouseInfo[House][hExity] = 1114.4792;
HouseInfo[House][hExitz] = 1083.8828;
HouseInfo[House][hInt] = 5;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 2.");
}
case 3:
{
HouseInfo[House][hExitx] = 2324.419921;
HouseInfo[House][hExity] = -1145.568359;
HouseInfo[House][hExitz] = 1050.710083;
HouseInfo[House][hInt] = 12;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 3.");
}
case 4:
{
HouseInfo[House][hExitx] = 235.508994;
HouseInfo[House][hExity] = 1189.169897;
HouseInfo[House][hExitz] = 1080.339966;
HouseInfo[House][hInt] = 3;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 4.");
}
case 5:
{
HouseInfo[House][hExitx] = 225.756989;
HouseInfo[House][hExity] = 1240.000000;
HouseInfo[House][hExitz] = 1082.149902;
HouseInfo[House][hInt] = 2;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 5.");
}
case 6:
{
HouseInfo[House][hExitx] = 223.043991;
HouseInfo[House][hExity] = 1289.259888;
HouseInfo[House][hExitz] = 1082.199951;
HouseInfo[House][hInt] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 6.");
}
case 7:
{
if(PlayerDados[playerid][pVip] < 1)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um VIP !");
return 1;
}
HouseInfo[House][hExitx] = 225.630997;
HouseInfo[House][hExity] = 1022.479980;
HouseInfo[House][hExitz] = 1084.069946;
HouseInfo[House][hInt] = 7;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 7.");
}
case 8:
{
if(PlayerDados[playerid][pVip] < 2)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um Sуcio Bronze!");
return 1;
}
HouseInfo[House][hExitx] = 328.493988;
HouseInfo[House][hExity] = 1480.589966;
HouseInfo[House][hExitz] = 1084.449951;
HouseInfo[House][hInt] = 15;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 8.");
}
case 9:
{
if(PlayerDados[playerid][pVip] < 2)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um Sуcio Bronze!");
return 1;
}
HouseInfo[House][hExitx] = 234.0843;
HouseInfo[House][hExity] = 1064.6896;
HouseInfo[House][hExitz] = 1084.2108;
HouseInfo[House][hInt] = 6;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 9.");
}
case 10:
{
if(PlayerDados[playerid][pVip] < 2)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um Sуcio Bronze!");
return 1;
}
HouseInfo[House][hExitx] = 260.4075;
HouseInfo[House][hExity] = 1238.6646;
HouseInfo[House][hExitz] = 1084.2578;
HouseInfo[House][hInt] = 9;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 10.");
}
case 11:
{
if(PlayerDados[playerid][pVip] < 2)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um Sуcio Broze !");
return 1;
}
HouseInfo[House][hExitx] = 88.5938;
HouseInfo[House][hExity] = 1702.7601;
HouseInfo[House][hExitz] = 100001.2734;
HouseInfo[House][hInt] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 11.");
}
case 12:
{
if(PlayerDados[playerid][pVip] < 3)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um Sуcio Prata !");
return 1;
}
HouseInfo[House][hExitx] = 243.7127;
HouseInfo[House][hExity] = -1851.3945;
HouseInfo[House][hExitz] = 3333.9329;
HouseInfo[House][hInt] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 12.");
}
case 13:
{
if(PlayerDados[playerid][pVip] < 3)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um Sуcio Prata !");
return 1;
}
HouseInfo[House][hExitx] = 132.0281;
HouseInfo[House][hExity] = 1689.6173;
HouseInfo[House][hExitz] = 10012.0879;
HouseInfo[House][hInt] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 13.");
SalvarCasa(House);
}
case 14:
{
if(PlayerDados[playerid][pVip] < 4)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um Sуcio Ouro!");
return 1;
}
HouseInfo[House][hExitx] = 324.4288;
HouseInfo[House][hExity] = -1579.0096;
HouseInfo[House][hExitz] = 10.1469;
HouseInfo[House][hInt] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 14.");
SalvarCasa(House);
}
case 15:
{
if(PlayerDados[playerid][pVip] < 4)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo й um Sуcio Ouro !");
return 1;
}
HouseInfo[House][hExitx] = 851.6885;
HouseInfo[House][hExity] = 1997.9625;
HouseInfo[House][hExitz] = 1011.0809;
HouseInfo[House][hInt] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 15.");
SalvarCasa(House);
}
}
GivePlayerMoney(playerid,-1000);
SBizzInfo[10][sbTill] += 200;
ExtortionSBiz(10, 200);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
GastarProdutos(2, 10, 7);
SalvarTudo();
SalvarCasa(House);
SalvarPlayer(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem uma casa");
return 1;
}
}


CallBack:: SalvarCasa(houseid)
{
new file[64];
format(file, sizeof(file), "/NacionalPlayer/Casas/Casa%d.ini", houseid);
if(!DOF2_FileExists(file))
{
DOF2_CreateFile(file);
}
DOF2_SetString(file, "Dono",HouseInfo[houseid][hOwner]);
DOF2_SetInt(file, "Level", HouseInfo[houseid][hLevel]);
DOF2_SetFloat(file, "EntradaX", HouseInfo[houseid][hEntrancex]);
DOF2_SetFloat(file, "EntradaY", HouseInfo[houseid][hEntrancey]);
DOF2_SetFloat(file, "EntradaZ", HouseInfo[houseid][hEntrancez]);
DOF2_SetFloat(file, "SaidaX", HouseInfo[houseid][hExitx]);
DOF2_SetFloat(file, "SaidaY", HouseInfo[houseid][hExity]);
DOF2_SetFloat(file, "SaidaZ", HouseInfo[houseid][hExitz]);
DOF2_SetString(file, "Descricao",HouseInfo[houseid][hDiscription]);
DOF2_SetInt(file, "Valor", HouseInfo[houseid][hValue]);
DOF2_SetInt(file, "Interior", HouseInfo[houseid][hInt]);
DOF2_SetInt(file, "Vida", HouseInfo[houseid][hHel]);
DOF2_SetInt(file, "Colete", HouseInfo[houseid][hArm]);
DOF2_SetInt(file, "Trancada", HouseInfo[houseid][hLock]);
DOF2_SetInt(file, "Comprada", HouseInfo[houseid][hOwned]);
DOF2_SetInt(file, "Aluguel", HouseInfo[houseid][hRent]);
DOF2_SetInt(file, "Alugavel", HouseInfo[houseid][hRentabil]);
DOF2_SetInt(file, "CofreR", HouseInfo[houseid][hTakings]);
DOF2_SetInt(file, "Carro", HouseInfo[houseid][hVec]);
DOF2_SetInt(file, "Cor1", HouseInfo[houseid][hVcol1]);
DOF2_SetInt(file, "Cor2", HouseInfo[houseid][hVcol2]);
DOF2_SetInt(file, "VW", HouseInfo[houseid][hWorld]);
DOF2_SetInt(file, "Data", HouseInfo[houseid][hDate]);
DOF2_SetFloat(file, "hSpawnX", HouseInfo[houseid][hSpawnX]);
DOF2_SetFloat(file, "hSpawnY", HouseInfo[houseid][hSpawnY]);
DOF2_SetFloat(file, "hSpawnZ", HouseInfo[houseid][hSpawnZ]);
DOF2_SetFloat(file, "hSpawnA", HouseInfo[houseid][hSpawnA]);
DOF2_SetInt(file, "Ativa", HouseInfo[houseid][hAtiva]);
DOF2_SetInt(file, "HImposto", HouseInfo[houseid][hImposto]);
DOF2_SaveFile();
return 1;
}

CallBack:: SalvarTudo()
{
new file[64];
for(new h=0; h < MAX_HOUSES;h++)
{
format(file, sizeof(file), "/NacionalPlayer/Casas/Casa%d.ini", h);
if(!DOF2_FileExists(file))
{
DOF2_CreateFile(file);
}
DOF2_SetString(file, "Dono",HouseInfo[h][hOwner]);
DOF2_SetInt(file, "Level", HouseInfo[h][hLevel]);
DOF2_SetFloat(file, "EntradaX", HouseInfo[h][hEntrancex]);
DOF2_SetFloat(file, "EntradaY", HouseInfo[h][hEntrancey]);
DOF2_SetFloat(file, "EntradaZ", HouseInfo[h][hEntrancez]);
DOF2_SetFloat(file, "SaidaX", HouseInfo[h][hExitx]);
DOF2_SetFloat(file, "SaidaY", HouseInfo[h][hExity]);
DOF2_SetFloat(file, "SaidaZ", HouseInfo[h][hExitz]);
DOF2_SetString(file, "Descricao",HouseInfo[h][hDiscription]);
DOF2_SetInt(file, "Valor", HouseInfo[h][hValue]);
DOF2_SetInt(file, "Interior", HouseInfo[h][hInt]);
DOF2_SetInt(file, "Vida", HouseInfo[h][hHel]);
DOF2_SetInt(file, "Colete", HouseInfo[h][hArm]);
DOF2_SetInt(file, "Trancada", HouseInfo[h][hLock]);
DOF2_SetInt(file, "Comprada", HouseInfo[h][hOwned]);
DOF2_SetInt(file, "Aluguel", HouseInfo[h][hRent]);
DOF2_SetInt(file, "Alugavel", HouseInfo[h][hRentabil]);
DOF2_SetInt(file, "CofreR", HouseInfo[h][hTakings]);
DOF2_SetInt(file, "Carro", HouseInfo[h][hVec]);
DOF2_SetInt(file, "Cor1", HouseInfo[h][hVcol1]);
DOF2_SetInt(file, "Cor2", HouseInfo[h][hVcol2]);
DOF2_SetInt(file, "VW", HouseInfo[h][hWorld]);
DOF2_SetInt(file, "Data", HouseInfo[h][hDate]);
DOF2_SetFloat(file, "hSpawnX", HouseInfo[h][hSpawnX]);
DOF2_SetFloat(file, "hSpawnY", HouseInfo[h][hSpawnY]);
DOF2_SetFloat(file, "hSpawnZ", HouseInfo[h][hSpawnZ]);
DOF2_SetFloat(file, "hSpawnA", HouseInfo[h][hSpawnA]);
DOF2_SetInt(file, "Ativa", HouseInfo[h][hAtiva]);
DOF2_SaveFile();
}
for(new h=0; h < MAX_SBIZZES;h++)
{
format(file, sizeof(file), "/NacionalPlayer/MiniEmpresas/MiniEmpresa%d.ini", h);
if(!DOF2_FileExists(file))
{
DOF2_CreateFile(file);
}
DOF2_SetString(file, "Nome",SBizzInfo[h][sbMessage]);
DOF2_SetString(file, "Dono",SBizzInfo[h][sbOwner]);
DOF2_SetInt(file, "Level", SBizzInfo[h][sbLevel]);
DOF2_SetInt(file, "Preco", SBizzInfo[h][sbBuyPrice]);
DOF2_SetString(file, "Extorsao",SBizzInfo[h][sbExtortion]);
DOF2_SetInt(file, "Comprada", SBizzInfo[h][sbOwned]);
DOF2_SetFloat(file, "EntradaX", SBizzInfo[h][sbEntranceX]);
DOF2_SetFloat(file, "EntradaY", SBizzInfo[h][sbEntranceY]);
DOF2_SetFloat(file, "EntradaZ", SBizzInfo[h][sbEntranceZ]);
DOF2_SetInt(file, "Entrada", SBizzInfo[h][sbEntranceCost]);
DOF2_SetInt(file, "Cofre", SBizzInfo[h][sbTill]);
DOF2_SetInt(file, "Trancada", SBizzInfo[h][sbLocked]);
DOF2_SetInt(file, "Produtos", SBizzInfo[h][sbProd]);
DOF2_SetInt(file, "MaxProdutos", SBizzInfo[h][sbMaxProd]);
DOF2_SetInt(file, "Ativa", SBizzInfo[h][sbAtiva]);
DOF2_SetInt(file, "Lucro", SBizzInfo[h][sbLucro]);
DOF2_SetInt(file, "Receber", SBizzInfo[h][sbReceber]);
DOF2_SaveFile();
}
for(new h=0; h < MAX_FAZENDA;h++)
{
format(file, sizeof(file), "/NacionalPlayer/Fazendas/Fazenda%d.ini", h);
if(!DOF2_FileExists(file))
{
DOF2_CreateFile(file);
}
DOF2_SetString(file, "Nome",FazendaInfo[h][fDescricao]);
DOF2_SetString(file, "Dono",FazendaInfo[h][fDono]);
DOF2_SetInt(file, "Level", FazendaInfo[h][fLevel]);
DOF2_SetInt(file, "Preco", FazendaInfo[h][fValor]);
DOF2_SetInt(file, "Comprada", FazendaInfo[h][fOwned]);
DOF2_SetFloat(file, "EntradaX", FazendaInfo[h][ffX]);
DOF2_SetFloat(file, "EntradaY", FazendaInfo[h][ffY]);
DOF2_SetFloat(file, "EntradaZ", FazendaInfo[h][ffZ]);
DOF2_SetInt(file, "Cofre", FazendaInfo[h][fFundos]);
DOF2_SetInt(file, "Produtos", FazendaInfo[h][fProd]);
DOF2_SetInt(file, "MaxProdutos", FazendaInfo[h][fMaxProd]);
DOF2_SetInt(file, "Ativa", FazendaInfo[h][fAtiva]);
DOF2_SetInt(file, "Lucro", FazendaInfo[h][fLucro]);
DOF2_SetInt(file, "Receber", FazendaInfo[h][fReceber]);
DOF2_SaveFile();
}
return 1;
}
Reply
#6

Nгo testei, mais tenta dessa maneira:

PHP код:
    if(strcmp(cmd,"/mudarcasa"true) == 0)
    {
        new 
House PlayerDados[playerid][pPHousekey],
            
idcasa strval(tmp);
            
        
GetPlayerName(playeridplayernamesizeof(playername));
        if (
House != 9999 && strcmp(playernameHouseInfo[PlayerDados[playerid][pPHousekey]][hOwner], true) == 0)
        {
            
tmp strtok(cmdtextidx);
            if(
HouseEntered[playerid] != 9999) {
                return 
SendClientMessage(playeridCOLOR_GREY"Vocк nгo pode usar esse comando dentro de uma casa");
            }
            if(
GetPlayerMoneyEx(playerid) < 1000) {
                return 
SendClientMessage(playeridCOLOR_GRAD5"Vocк nгo tem dinheiro suficiente R$1000");
            }
            if(!
strlen(tmp)) {
                return 
SendClientMessage(playeridCOLOR_GREY"USE: /mudarcasa [1 a 15]");
            }
            switch (
idcasa) {
            
                case 
1: {
                    
HouseInfo[House][hExitx] = 2467.4951;
                    
HouseInfo[House][hExity] = -1698.4037;
                    
HouseInfo[House][hExitz] = 1013.5078;
                    
HouseInfo[House][hInt] = 2;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 1.");
                }
                case 
2: {
                    
HouseInfo[House][hExitx] = 318.5972;
                    
HouseInfo[House][hExity] = 1114.4792;
                    
HouseInfo[House][hExitz] = 1083.8828;
                    
HouseInfo[House][hInt] = 5;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 2.");
                }
                case 
3: {
                    
HouseInfo[House][hExitx] = 2324.419921;
                    
HouseInfo[House][hExity] = -1145.568359;
                    
HouseInfo[House][hExitz] = 1050.710083;
                    
HouseInfo[House][hInt] = 12;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 3.");
                }
                case 
4: {
                    
HouseInfo[House][hExitx] = 235.508994;
                    
HouseInfo[House][hExity] = 1189.169897;
                    
HouseInfo[House][hExitz] = 1080.339966;
                    
HouseInfo[House][hInt] = 3;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 4.");
                }
                case 
5: {
                    
HouseInfo[House][hExitx] = 225.756989;
                    
HouseInfo[House][hExity] = 1240.000000;
                    
HouseInfo[House][hExitz] = 1082.149902;
                    
HouseInfo[House][hInt] = 2;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 5.");
                }
                case 
6: {
                    
HouseInfo[House][hExitx] = 223.043991;
                    
HouseInfo[House][hExity] = 1289.259888;
                    
HouseInfo[House][hExitz] = 1082.199951;
                    
HouseInfo[House][hInt] = 1;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 6.");
                }
                case 
7: {
                    if(
PlayerDados[playerid][pVip] < 1) {
                        
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um VIP !");
                        return 
1;
                    }
                    
HouseInfo[House][hExitx] = 225.630997;
                    
HouseInfo[House][hExity] = 1022.479980;
                    
HouseInfo[House][hExitz] = 1084.069946;
                    
HouseInfo[House][hInt] = 7;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 7.");
                }
                case 
8: {
                    if(
PlayerDados[playerid][pVip] < 2) {
                        return 
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um Sуcio Bronze!");
                    }
                    
HouseInfo[House][hExitx] = 328.493988;
                    
HouseInfo[House][hExity] = 1480.589966;
                    
HouseInfo[House][hExitz] = 1084.449951;
                    
HouseInfo[House][hInt] = 15;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 8.");
                }
                case 
9: {
                    if(
PlayerDados[playerid][pVip] < 2) {
                        return 
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um Sуcio Bronze!");
                    }
                    
HouseInfo[House][hExitx] = 234.0843;
                    
HouseInfo[House][hExity] = 1064.6896;
                    
HouseInfo[House][hExitz] = 1084.2108;
                    
HouseInfo[House][hInt] = 6;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 9.");
                }
                case 
10: {
                    if(
PlayerDados[playerid][pVip] < 2) {
                        return 
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um Sуcio Bronze!");
                    }
                    
HouseInfo[House][hExitx] = 260.4075;
                    
HouseInfo[House][hExity] = 1238.6646;
                    
HouseInfo[House][hExitz] = 1084.2578;
                    
HouseInfo[House][hInt] = 9;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 10.");
                }
                case 
11: {
                    if(
PlayerDados[playerid][pVip] < 2) {
                        return 
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um Sуcio Broze !");
                    }
                    
HouseInfo[House][hExitx] = 88.5938;
                    
HouseInfo[House][hExity] = 1702.7601;
                    
HouseInfo[House][hExitz] = 100001.2734;
                    
HouseInfo[House][hInt] = 0;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 11.");
                }
                case 
12: {
                    if(
PlayerDados[playerid][pVip] < 3) {
                        return 
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um Sуcio Prata !");
                    }
                    
HouseInfo[House][hExitx] = 243.7127;
                    
HouseInfo[House][hExity] = -1851.3945;
                    
HouseInfo[House][hExitz] = 3333.9329;
                    
HouseInfo[House][hInt] = 0;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 12.");
                }
                case 
13: {
                    if(
PlayerDados[playerid][pVip] < 3) {
                        return 
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um Sуcio Prata !");
                    }
                    
HouseInfo[House][hExitx] = 132.0281;
                    
HouseInfo[House][hExity] = 1689.6173;
                    
HouseInfo[House][hExitz] = 10012.0879;
                    
HouseInfo[House][hInt] = 0;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 13.");
                    
SalvarCasa(House);
                }
                case 
14: {
                    if(
PlayerDados[playerid][pVip] < 4) {
                        return 
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um Sуcio Ouro!");
                    }
                    
HouseInfo[House][hExitx] = 324.4288;
                    
HouseInfo[House][hExity] = -1579.0096;
                    
HouseInfo[House][hExitz] = 10.1469;
                    
HouseInfo[House][hInt] = 0;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 14.");
                    
SalvarCasa(House);
                }
                case 
15: {
                    if(
PlayerDados[playerid][pVip] < 4) {
                        return 
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й um Sуcio Ouro !");
                    }
                    
HouseInfo[House][hExitx] = 851.6885;
                    
HouseInfo[House][hExity] = 1997.9625;
                    
HouseInfo[House][hExitz] = 1011.0809;
                    
HouseInfo[House][hInt] = 0;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Interior setado para id 15.");
                    
SalvarCasa(House);
                }
            }
            
            
GivePlayerMoney(playerid, -1000);
            
SBizzInfo[10][sbTill] += 200;
            
ExtortionSBiz(10200);
            
PlayerPlaySound(playerid10520.00.00.0);
            
GastarProdutos(2107);
            
SalvarCasa(House);
            
            return 
true;
        }
        else
        {
            return 
SendClientMessage(playeridCOLOR_GRAD2"Vocк nгo tem uma casa");
        }
    } 
Reply
#7

ok , vou testar aqui , depois posto o resultado
Reply
#8

que eu Notei no salvamento das casas
o Interior estб sendo salvo
jб verificou a pasta ?
Reply
#9

Theus nao deu certo , agora esta diminuindo o dinheiro mais nao muda interior
Reply
#10

Tenta trocar sua Callback "SalvarCasa" por isso:

Se caso nгo funcionar manda seu comando GMX.

PHP код:
stock SalvarCasa(houseid)
{
    new 
files[75];
    
format(filessizeof files"/NacionalPlayer/Casas/Casa%d.ini"houseid);
    if(
DOF2_FileExists(files))
    {
            
DOF2_SetString(files"Dono",HouseInfo[houseid][hOwner]);
            
DOF2_SetInt(files"Level"HouseInfo[houseid][hLevel]);
            
DOF2_SetFloat(files"EntradaX"HouseInfo[houseid][hEntrancex]);
            
DOF2_SetFloat(files"EntradaY"HouseInfo[houseid][hEntrancey]);
            
DOF2_SetFloat(files"EntradaZ"HouseInfo[houseid][hEntrancez]);
            
DOF2_SetFloat(files"SaidaX"HouseInfo[houseid][hExitx]);
            
DOF2_SetFloat(files"SaidaY"HouseInfo[houseid][hExity]);
            
DOF2_SetFloat(files"SaidaZ"HouseInfo[houseid][hExitz]);
            
DOF2_SetString(files"Descricao",HouseInfo[houseid][hDiscription]);
            
DOF2_SetInt(files"Valor"HouseInfo[houseid][hValue]);
            
DOF2_SetInt(files"Interior"HouseInfo[houseid][hInt]);
            
DOF2_SetInt(filess"Interior"HouseInfo[idx][hInt]);
            
DOF2_SetInt(files"Vida"HouseInfo[houseid][hHel]);
            
DOF2_SetInt(files"Colete"HouseInfo[houseid][hArm]);
            
DOF2_SetInt(files"Trancada"HouseInfo[houseid][hLock]);
            
DOF2_SetInt(files"Comprada"HouseInfo[houseid][hOwned]);
            
DOF2_SetInt(files"Aluguel"HouseInfo[houseid][hRent]);
            
DOF2_SetInt(files"Alugavel"HouseInfo[houseid][hRentabil]);
            
DOF2_SetInt(files"CofreR"HouseInfo[houseid][hTakings]);
            
DOF2_SetInt(files"Carro"HouseInfo[houseid][hVec]);
            
DOF2_SetInt(files"Cor1"HouseInfo[houseid][hVcol1]);
            
DOF2_SetInt(files"Cor2"HouseInfo[houseid][hVcol2]);
            
DOF2_SetInt(files"VW"HouseInfo[houseid][hWorld]);
            
DOF2_SetInt(files"Data"HouseInfo[houseid][hDate]);
            
DOF2_SetFloat(files"hSpawnX"HouseInfo[houseid][hSpawnX]);
            
DOF2_SetFloat(files"hSpawnY"HouseInfo[houseid][hSpawnY]);
            
DOF2_SetFloat(files"hSpawnZ"HouseInfo[houseid][hSpawnZ]);
            
DOF2_SetFloat(files"hSpawnA"HouseInfo[houseid][hSpawnA]);
            
DOF2_SetInt(files"Ativa"HouseInfo[houseid][hAtiva]);
            
DOF2_SetInt(files"HImposto"HouseInfo[houseid][hImposto]);
            
            
DOF2_SaveFile();
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)