[Ajuda] Concessionaria Bugada!
#1

Boa Noite, gostaria de pedir ajuda em questгo de uma concessionaria de veiculos VIP, esses veiculos vips como a maioria sabe esta na GM Brasil Play Fatal, eu tento passar ela pra minha GM, mais ocorreu o seguinte problema, ao ligar o servidor tudo bem agente digita /comprarcarro e eu compro o carro normalmente, ao servidor ser reiniciado todo mundo perde o dono do veciulo, eu ja revisei ja passei tudo pra minha, olhei linha por linha e nгo conseguir resolver o problema, Creio eu que deve ter alguma linha secreta em relaзгo a esse salvamento...

Quem puder resolver o problema irei deixar a GM do Play Fatal hospedada aqui para poder me ajudar, basta ter a GM do Play Slayers que o problema aparece...

https://www.sendspace.com/file/dfz5il
Reply
#2

Eu vou te dar uma dica bem rбpida e pratica aqui amigгo. Tenta nгo copiar codes de outros gamemodes para o seu gamemode, primeiro que pode ser complicado, tratando-se de sistemas complexos, como й o seu caso, segundo que pode ser complicado o reparo de um eventual erro.
Poste em code o salvamento do GM que vocк estб tentando pegar e como estar no seu gamemode, separe tudo e poste aqui. Baixar o gamemode й fora de mгo.
Reply
#3

Boa noite own3d33, realmente vocк tem razгo mais nгo vejo saida pois eu nгo tenho capacidade no momento pra criar um sistema de concessionaria e pra mim e meio complicado ficar sem a concessionaria...

Segue as informaзхes abaixo:

Minha GM:

Quote:

static stock SalvarCarros()
{
new strsave[64];
for(new idx = 0; idx < sizeof(CarInfo); idx ++)
{
format(strsave, sizeof strsave, Pasta_Carros, idx);
DOF2_SetInt(strsave, "Modelo", CarInfo[idx][cModel]);
DOF2_SetFloat(strsave, "CarroX", CarInfo[idx][cLocationx]);
DOF2_SetFloat(strsave, "CarroY", CarInfo[idx][cLocationy]);
DOF2_SetFloat(strsave, "CarroZ", CarInfo[idx][cLocationz]);
DOF2_SetFloat(strsave, "CarroA", CarInfo[idx][cAngle]);
DOF2_SetInt(strsave, "cor1", CarInfo[idx][cColorOne]);
DOF2_SetInt(strsave, "cor2", CarInfo[idx][cColorTwo]);
DOF2_SetString(strsave, "Dono", CarInfo[idx][cOwner]);
DOF2_SetString(strsave, "Descricao", CarInfo[idx][cDescription]);
DOF2_SetInt(strsave, "Valor", CarInfo[idx][cValue]);
DOF2_SetInt(strsave, "Licence", CarInfo[idx][cLicense]);
DOF2_SetInt(strsave, "TemDono", CarInfo[idx][cOwned]);
DOF2_SetInt(strsave, "Trancado", CarInfo[idx][cLock]);
DOF2_SetInt(strsave, "Grana", CarInfo[idx][cGrana]);
DOF2_SetInt(strsave, "Entrada", CarInfo[idx][cEntrada]);
DOF2_SetInt(strsave, "Date", CarInfo[idx][cDate]);

DOF2_SetFloat(strsave, "OCarroX", CarInfo[idx][cOLocationx]);
DOF2_SetFloat(strsave, "OCarroY", CarInfo[idx][cOLocationy]);
DOF2_SetFloat(strsave, "OCarroZ", CarInfo[idx][cOLocationz]);
DOF2_SetFloat(strsave, "OCarroA", CarInfo[idx][cOAngle]);

DOF2_SaveFile();
}
return true;
}
static stock SalvarCarro(idx)
{
new strsave[64];
format(strsave, sizeof strsave, Pasta_Carros, idx);
if(DOF2_FileExists(strsave))
{
DOF2_SetInt(strsave, "Modelo", CarInfo[idx][cModel]);
DOF2_SetFloat(strsave, "CarroX", CarInfo[idx][cLocationx]);
DOF2_SetFloat(strsave, "CarroY", CarInfo[idx][cLocationy]);
DOF2_SetFloat(strsave, "CarroZ", CarInfo[idx][cLocationz]);
DOF2_SetFloat(strsave, "CarroA", CarInfo[idx][cAngle]);
DOF2_SetInt(strsave, "cor1", CarInfo[idx][cColorOne]);
DOF2_SetInt(strsave, "cor2", CarInfo[idx][cColorTwo]);
DOF2_SetString(strsave, "Dono", CarInfo[idx][cOwner]);
DOF2_SetString(strsave, "Descricao", CarInfo[idx][cDescription]);
DOF2_SetInt(strsave, "Valor", CarInfo[idx][cValue]);
DOF2_SetInt(strsave, "Licence", CarInfo[idx][cLicense]);
DOF2_SetInt(strsave, "TemDono", CarInfo[idx][cOwned]);
DOF2_SetInt(strsave, "Trancado", CarInfo[idx][cLock]);
DOF2_SetInt(strsave, "Grana", CarInfo[idx][cGrana]);
DOF2_SetInt(strsave, "Entrada", CarInfo[idx][cEntrada]);
DOF2_SetInt(strsave, "Date", CarInfo[idx][cDate]);

DOF2_SetFloat(strsave, "OCarroX", CarInfo[idx][cOLocationx]);
DOF2_SetFloat(strsave, "OCarroY", CarInfo[idx][cOLocationy]);
DOF2_SetFloat(strsave, "OCarroZ", CarInfo[idx][cOLocationz]);
DOF2_SetFloat(strsave, "OCarroA", CarInfo[idx][cOAngle]);

DOF2_SaveFile();
}
return true;
}

static stock CarregarCarros()
{
new strsave[100];
//new string[128];
new idx = 0;
while(idx < sizeof(CarInfo))
{
format(strsave, sizeof strsave, Pasta_Carros, idx);
if(DOF2_FileExists(strsave))
{
CarInfo[idx][cModel] = DOF2_GetInt(strsave, "Modelo");
CarInfo[idx][cLocationx] = DOF2_GetFloat(strsave, "CarroX");
CarInfo[idx][cLocationy] = DOF2_GetFloat(strsave, "CarroY");
CarInfo[idx][cLocationz] = DOF2_GetFloat(strsave, "CarroZ");
CarInfo[idx][cAngle] = DOF2_GetFloat(strsave, "CarroA");
CarInfo[idx][cColorOne] = DOF2_GetInt(strsave, "cor1");
CarInfo[idx][cOLocationx] = DOF2_GetFloat(strsave, "CarroX");
CarInfo[idx][cOLocationy] = DOF2_GetFloat(strsave, "CarroY");
CarInfo[idx][cOLocationz] = DOF2_GetFloat(strsave, "CarroZ");
CarInfo[idx][cOAngle] = DOF2_GetFloat(strsave, "CarroA");
CarInfo[idx][cColorTwo] = DOF2_GetInt(strsave, "cor2");
strmid(CarInfo[idx][cOwner], DOF2_GetString(strsave, "Dono"), 0 , strlen(DOF2_GetString(strsave, "Dono")), 255);
strmid(CarInfo[idx][cDescription], DOF2_GetString(strsave, "Descricao"), 0, strlen(DOF2_GetString(strsave, "Descricao")), 255);
CarInfo[idx][cValue] = DOF2_GetInt(strsave, "Valor");
CarInfo[idx][cLicense] = DOF2_GetInt(strsave, "Licence");
CarInfo[idx][cOwned] = DOF2_GetInt(strsave, "TemDono");
CarInfo[idx][cLock] = DOF2_GetInt(strsave, "Trancado");
CarInfo[idx][cGrana] = DOF2_GetInt(strsave, "Grana");
CarInfo[idx][cEntrada] = DOF2_GetInt(strsave, "Entrada");
CarInfo[idx][cDate] = DOF2_GetInt(strsave, "Date");

if(CarInfo[idx][cModel] == 0)
{
CarInfo[idx][cModel] = 559;
}
if(CarInfo[idx][cValue] == 0)
{
CarInfo[idx][cValue] = 10000;
}
if(CarInfo[idx][cEntrada] < 1000)
{
CarInfo[idx][cEntrada] = 1000;
}

CarInfo[idx][ownedvehicle] = AddStaticVehicleEx(CarInfo[idx][cModel],
CarInfo[idx][cLocationx],CarInfo[idx][cLocationy],CarInfo[idx][cLocationz],
CarInfo[idx][cAngle],CarInfo[idx][cColorOne],CarInfo[idx][cColorTwo],-1);


if(strlen(CarInfo[idx][cDescription]) < 2){
strmid(CarInfo[idx][cDescription], "Nenhuma", 0, strlen("Nenhuma"), 255);
}
if(strlen(CarInfo[idx][cOwner]) < 2){
strmid(CarInfo[idx][cOwner], "Ninguйm", 0, strlen("Ninguйm"), 255);
}

if(CarInfo[idx][cOwned])
{
//format(string, sizeof string, "{50AAFE}Dono: %s\n{FFFF00}Descriзгo\n{FFFFFF}»%s«", CarInfo[idx][cOwner], CarInfo[idx][cDescription]);
//CarInfo[idx][cText] = Create3DTextLabel(string, 0xffffaa, 0.0, 0.0, 0.0, 10.0, 0);
//Attach3DTextLabelToVehicle(CarInfo[idx][cText], CarInfo[idx][ownedvehicle], 0.0, 0.0, 0.0);
}
else
{
//CarInfo[idx][cText] = Create3DTextLabel("{50AAFE}Dono: Ninguйm\n{FFFF00}Descriзгo\n{FFFFFF}»Sem Dono«", 0xffffaa, 0.0, 0.0, 0.0, 15.0, 0);
//Attach3DTextLabelToVehicle(CarInfo[idx][cText], CarInfo[idx][ownedvehicle], 0.0, 0.0, 0.0);
}
}
idx++;
}
return idx;
}



GM Do Play Fatal:

Quote:

static stock SalvarCarros()
{
new strsave[64];
for(new idx = 0; idx < sizeof(CarInfo); idx ++)
{
format(strsave, sizeof strsave, Pasta_Carros, idx);
DOF2_SetInt(strsave, "Modelo", CarInfo[idx][cModel]);
DOF2_SetFloat(strsave, "CarroX", CarInfo[idx][cLocationx]);
DOF2_SetFloat(strsave, "CarroY", CarInfo[idx][cLocationy]);
DOF2_SetFloat(strsave, "CarroZ", CarInfo[idx][cLocationz]);
DOF2_SetFloat(strsave, "CarroA", CarInfo[idx][cAngle]);
DOF2_SetInt(strsave, "cor1", CarInfo[idx][cColorOne]);
DOF2_SetInt(strsave, "cor2", CarInfo[idx][cColorTwo]);
DOF2_SetString(strsave, "Dono", CarInfo[idx][cOwner]);
DOF2_SetString(strsave, "Descricao", CarInfo[idx][cDescription]);
DOF2_SetInt(strsave, "Valor", CarInfo[idx][cValue]);
DOF2_SetInt(strsave, "Licence", CarInfo[idx][cLicense]);
DOF2_SetInt(strsave, "TemDono", CarInfo[idx][cOwned]);
DOF2_SetInt(strsave, "Trancado", CarInfo[idx][cLock]);
DOF2_SetInt(strsave, "Grana", CarInfo[idx][cGrana]);
DOF2_SetInt(strsave, "Entrada", CarInfo[idx][cEntrada]);
DOF2_SetInt(strsave, "Date", CarInfo[idx][cDate]);

DOF2_SetFloat(strsave, "OCarroX", CarInfo[idx][cOLocationx]);
DOF2_SetFloat(strsave, "OCarroY", CarInfo[idx][cOLocationy]);
DOF2_SetFloat(strsave, "OCarroZ", CarInfo[idx][cOLocationz]);
DOF2_SetFloat(strsave, "OCarroA", CarInfo[idx][cOAngle]);

DOF2_SaveFile();
}
return true;
}
static stock SalvarCarro(idx)
{
new strsave[64];
format(strsave, sizeof strsave, Pasta_Carros, idx);
if(DOF2_FileExists(strsave))
{
DOF2_SetInt(strsave, "Modelo", CarInfo[idx][cModel]);
DOF2_SetFloat(strsave, "CarroX", CarInfo[idx][cLocationx]);
DOF2_SetFloat(strsave, "CarroY", CarInfo[idx][cLocationy]);
DOF2_SetFloat(strsave, "CarroZ", CarInfo[idx][cLocationz]);
DOF2_SetFloat(strsave, "CarroA", CarInfo[idx][cAngle]);
DOF2_SetInt(strsave, "cor1", CarInfo[idx][cColorOne]);
DOF2_SetInt(strsave, "cor2", CarInfo[idx][cColorTwo]);
DOF2_SetString(strsave, "Dono", CarInfo[idx][cOwner]);
DOF2_SetString(strsave, "Descricao", CarInfo[idx][cDescription]);
DOF2_SetInt(strsave, "Valor", CarInfo[idx][cValue]);
DOF2_SetInt(strsave, "Licence", CarInfo[idx][cLicense]);
DOF2_SetInt(strsave, "TemDono", CarInfo[idx][cOwned]);
DOF2_SetInt(strsave, "Trancado", CarInfo[idx][cLock]);
DOF2_SetInt(strsave, "Grana", CarInfo[idx][cGrana]);
DOF2_SetInt(strsave, "Entrada", CarInfo[idx][cEntrada]);
DOF2_SetInt(strsave, "Date", CarInfo[idx][cDate]);

DOF2_SetFloat(strsave, "OCarroX", CarInfo[idx][cOLocationx]);
DOF2_SetFloat(strsave, "OCarroY", CarInfo[idx][cOLocationy]);
DOF2_SetFloat(strsave, "OCarroZ", CarInfo[idx][cOLocationz]);
DOF2_SetFloat(strsave, "OCarroA", CarInfo[idx][cOAngle]);

DOF2_SaveFile();
}
return true;
}

static stock CarregarCarros()
{
new strsave[100];
//new string[128];
new idx = 0;
while(idx < sizeof(CarInfo))
{
format(strsave, sizeof strsave, Pasta_Carros, idx);
if(DOF2_FileExists(strsave))
{
CarInfo[idx][cModel] = DOF2_GetInt(strsave, "Modelo");
CarInfo[idx][cLocationx] = DOF2_GetFloat(strsave, "CarroX");
CarInfo[idx][cLocationy] = DOF2_GetFloat(strsave, "CarroY");
CarInfo[idx][cLocationz] = DOF2_GetFloat(strsave, "CarroZ");
CarInfo[idx][cAngle] = DOF2_GetFloat(strsave, "CarroA");
CarInfo[idx][cColorOne] = DOF2_GetInt(strsave, "cor1");
CarInfo[idx][cOLocationx] = DOF2_GetFloat(strsave, "CarroX");
CarInfo[idx][cOLocationy] = DOF2_GetFloat(strsave, "CarroY");
CarInfo[idx][cOLocationz] = DOF2_GetFloat(strsave, "CarroZ");
CarInfo[idx][cOAngle] = DOF2_GetFloat(strsave, "CarroA");
CarInfo[idx][cColorTwo] = DOF2_GetInt(strsave, "cor2");
strmid(CarInfo[idx][cOwner], DOF2_GetString(strsave, "Dono"), 0 , strlen(DOF2_GetString(strsave, "Dono")), 255);
strmid(CarInfo[idx][cDescription], DOF2_GetString(strsave, "Descricao"), 0, strlen(DOF2_GetString(strsave, "Descricao")), 255);
CarInfo[idx][cValue] = DOF2_GetInt(strsave, "Valor");
CarInfo[idx][cLicense] = DOF2_GetInt(strsave, "Licence");
CarInfo[idx][cOwned] = DOF2_GetInt(strsave, "TemDono");
CarInfo[idx][cLock] = DOF2_GetInt(strsave, "Trancado");
CarInfo[idx][cGrana] = DOF2_GetInt(strsave, "Grana");
CarInfo[idx][cEntrada] = DOF2_GetInt(strsave, "Entrada");
CarInfo[idx][cDate] = DOF2_GetInt(strsave, "Date");

if(CarInfo[idx][cModel] == 0)
{
CarInfo[idx][cModel] = 559;
}
if(CarInfo[idx][cValue] == 0)
{
CarInfo[idx][cValue] = 10000;
}
if(CarInfo[idx][cEntrada] < 1000)
{
CarInfo[idx][cEntrada] = 1000;
}

CarInfo[idx][ownedvehicle] = AddStaticVehicleEx(CarInfo[idx][cModel],
CarInfo[idx][cLocationx],CarInfo[idx][cLocationy],CarInfo[idx][cLocationz],
CarInfo[idx][cAngle],CarInfo[idx][cColorOne],CarInfo[idx][cColorTwo],-1);


if(strlen(CarInfo[idx][cDescription]) < 2){
strmid(CarInfo[idx][cDescription], "Nenhuma", 0, strlen("Nenhuma"), 255);
}
if(strlen(CarInfo[idx][cOwner]) < 2){
strmid(CarInfo[idx][cOwner], "Ninguйm", 0, strlen("Ninguйm"), 255);
}

if(CarInfo[idx][cOwned])
{
//format(string, sizeof string, "{50AAFE}Dono: %s\n{FFFF00}Descriзгo\n{FFFFFF}»%s«", CarInfo[idx][cOwner], CarInfo[idx][cDescription]);
//CarInfo[idx][cText] = Create3DTextLabel(string, 0xffffaa, 0.0, 0.0, 0.0, 10.0, 0);
//Attach3DTextLabelToVehicle(CarInfo[idx][cText], CarInfo[idx][ownedvehicle], 0.0, 0.0, 0.0);
}
else
{
//CarInfo[idx][cText] = Create3DTextLabel("{50AAFE}Dono: Ninguйm\n{FFFF00}Descriзгo\n{FFFFFF}»Sem Dono«", 0xffffaa, 0.0, 0.0, 0.0, 15.0, 0);
//Attach3DTextLabelToVehicle(CarInfo[idx][cText], CarInfo[idx][ownedvehicle], 0.0, 0.0, 0.0);
}
}
idx++;
}
return idx;
}

Obrigado...
Reply
#4

Alguйm ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)