29.07.2018, 04:31
quero sabe se precisa otimizar meu sistema de concessionaria codigo abaixo:
se tiver muito ruim nгo me critique, me ensine, nгo sou muito bom, talvez nem seja bom...
PHP код:
enum cI
{
cDono,
cCarId,
Float:cX,
Float:cY,
Float:cZ,
Float:cA,
cCor1,
cCor2,
};
//new VeiculosInfo[MAX_VEHICLES][cI];
new Gasolina[MAX_VEHICLES];
new valorcarro[MAX_PLAYERS];
enum pInfo
{
pAdmin[5],
pDinheiro,
pSkin,
//carro 1
pCarId,
Float:pCX,
Float:pCY,
Float:pCZ,
Float:pAngulo,
Float:pVida,
pGas,
pCor1,
pCor2,
pPlaca[8],
pComponente0,
pComponente1,
pComponente2,
pComponente3,
pComponente4,
pComponente5,
pComponente6,
pComponente7,
pComponente8,
pComponente9,
pComponente10,
pComponente11,
pComponente12,
pComponente13,
pLataria,
pPorta,
pLuz,
pPneu
CMD:teste(playerid)
{
SelectTextDraw(playerid, -1);
for(new i; i < 9; i++) TextDrawShowForPlayer(playerid, Menucarro[i]);//mostra as text de compra, provisorio o /teste
return 1;
}
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
new string[200];
new aname[40];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "{FFFFFF} CONTA: {008000}Registrada \n {FFFFFF}Nome: {FFFF00}%s \n\n {FFFFFF}estб conta jб estб registrada \n Digite sua senha para logar",aname);
if(clickedid == Textdraw[4])
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "LOGIN", string, "Logar", "Sair");
return 1;
}
if(clickedid == Textdraw[9])
{
if(logado[playerid] == 1)
{
for(new i; i < 21; i++)
{
TextDrawDestroy(Textdraw[i]);
}
PlayerTextDrawDestroy(playerid, login[0]);
PlayerTextDrawDestroy(playerid, login[1]);
TogglePlayerSpectating(playerid, 0);
CancelSelectTextDraw(playerid);
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], SaveX, SaveY, SaveZ, 0,0,0,0,0,0,0);
SpawnPlayer(playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pDinheiro]);
SetPlayerHealth(playerid, Life);
SetPlayerArmour(playerid, Colete);
logado[playerid] = 2;
}
else
{
SCM(playerid, INFOA, "[AVISO] Vocк precisa se logar primeiro, para depois entrar no servidor!!");
}
return 1;
}
if(clickedid == Textdraw[11])
{
for(new i; i < 25; i++)
{
TextDrawDestroy(Textdraw[i]);
}
CancelSelectTextDraw(playerid);
SCM(playerid, INFOA, "[SERVER] Vocк foi saiu do servidor!!");
for(new i; i < 3; i++) PlayerTextDrawDestroy(playerid, login[i]);
Kick(playerid);
return 1;
}
if(clickedid == Menucarro[1])
{
if(GetPlayerMoney(playerid) >= 500000)
{
for(new i; i < 9; i++) TextDrawHideForPlayer(playerid, Menucarro[i]);
PlayerInfo[playerid][pCarId] = 411;
ShowPlayerDialog(playerid, DIALOG_COR, DIALOG_STYLE_LIST, "Escolha cor de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");
}
else{ SCM(playerid, INFOA, "Vocк nгo tem dinheiro suficiente para comprar esta veiculo !"); for(new i; i < 9; i++)TextDrawHideForPlayer(playerid, Menucarro[i]);}
}
if(clickedid == Menucarro[2])
{
if(GetPlayerMoney(playerid) >= 500000)
{
for(new i; i < 9; i++) TextDrawHideForPlayer(playerid, Menucarro[i]);
PlayerInfo[playerid][pCarId] = 477;
ShowPlayerDialog(playerid, DIALOG_COR, DIALOG_STYLE_LIST, "Escolha cor de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");
}
else{ SCM(playerid, INFOA, "Vocк nгo tem dinheiro suficiente para comprar esta veiculo !"); for(new i; i < 9; i++)TextDrawHideForPlayer(playerid, Menucarro[i]);}
}
if(clickedid == Menucarro[3])
{
if(GetPlayerMoney(playerid) >= 500000)
{
for(new i; i < 9; i++) TextDrawHideForPlayer(playerid, Menucarro[i]);
PlayerInfo[playerid][pCarId] = 451;
ShowPlayerDialog(playerid, DIALOG_COR, DIALOG_STYLE_LIST, "Escolha cor de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");
}
else{ SCM(playerid, INFOA, "Vocк nгo tem dinheiro suficiente para comprar esta veiculo !"); for(new i; i < 9; i++)TextDrawHideForPlayer(playerid, Menucarro[i]);}
}
if(clickedid == Menucarro[4])
{
if(GetPlayerMoney(playerid) >= 500000)
{
for(new i; i < 9; i++) TextDrawHideForPlayer(playerid, Menucarro[i]);
PlayerInfo[playerid][pCarId] = 506;
ShowPlayerDialog(playerid, DIALOG_COR, DIALOG_STYLE_LIST, "Escolha cor de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");
}
else{ SCM(playerid, INFOA, "Vocк nгo tem dinheiro suficiente para comprar esta veiculo !"); for(new i; i < 9; i++)TextDrawHideForPlayer(playerid, Menucarro[i]);}
}
if(clickedid == Menucarro[5])
{
if(GetPlayerMoney(playerid) >= 500000)
{
for(new i; i < 9; i++) TextDrawHideForPlayer(playerid, Menucarro[i]);
PlayerInfo[playerid][pCarId] = 541;
ShowPlayerDialog(playerid, DIALOG_COR, DIALOG_STYLE_LIST, "Escolha cor de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");
}
else{ SCM(playerid, INFOA, "Vocк nгo tem dinheiro suficiente para comprar esta veiculo !"); for(new i; i < 9; i++)TextDrawHideForPlayer(playerid, Menucarro[i]);}
}
if(clickedid == Menucarro[6])
{
if(GetPlayerMoney(playerid) >= 500000)
{
for(new i; i < 9; i++) TextDrawHideForPlayer(playerid, Menucarro[i]);
PlayerInfo[playerid][pCarId] = 587;
ShowPlayerDialog(playerid, DIALOG_COR, DIALOG_STYLE_LIST, "Escolha cor de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");
}
else{ SCM(playerid, INFOA, "Vocк nгo tem dinheiro suficiente para comprar esta veiculo !"); for(new i; i < 9; i++)TextDrawHideForPlayer(playerid, Menucarro[i]);}
}
if(clickedid == Menucarro[7])
{
if(GetPlayerMoney(playerid) >= 500000)
{
for(new i; i < 9; i++) TextDrawHideForPlayer(playerid, Menucarro[i]);
PlayerInfo[playerid][pCarId] = 603;
ShowPlayerDialog(playerid, DIALOG_COR, DIALOG_STYLE_LIST, "Escolha cor de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");
}
else{ SCM(playerid, INFOA, "Vocк nгo tem dinheiro suficiente para comprar esta veiculo !"); for(new i; i < 9; i++)TextDrawHideForPlayer(playerid, Menucarro[i]);}
}
if(clickedid == Menucarro[8])
{
if(GetPlayerMoney(playerid) >= 500000)
{
for(new i; i < 9; i++) TextDrawHideForPlayer(playerid, Menucarro[i]);
PlayerInfo[playerid][pCarId] = 559;
ShowPlayerDialog(playerid, DIALOG_COR, DIALOG_STYLE_LIST, "Escolha cor de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");
}
else{ SCM(playerid, INFOA, "Vocк nгo tem dinheiro suficiente para comprar esta veiculo !"); for(new i; i < 9; i++)TextDrawHideForPlayer(playerid, Menucarro[i]);}
}
if(clickedid == botao[0])
{
CriarCarro(playerid);
valorcarro[playerid] = 30000;
}
if(clickedid == botao[1])
{
for(new i; i < 3; i++) PlayerTextDrawHide(playerid, Pre[i]);
for(new v; v < 2; v++) TextDrawHideForPlayer(playerid, botao[v]);
CancelSelectTextDraw(playerid);
}
return 0;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_LOGIN)
{
if(response)
{
if(DOF2_CheckLogin(file,inputtext))
{
logado[playerid] = 1;
PlayerInfo[playerid][pAdmin] = DOF2_GetInt(file, "Admin");
PlayerInfo[playerid][pDinheiro] = DOF2_GetInt(file, "Dinheiro");
PlayerInfo[playerid][pSkin] = DOF2_GetInt(file, "Skin");
SaveX = DOF2_GetFloat(file, "SaveX");
SaveY = DOF2_GetFloat(file, "SaveY");
SaveZ = DOF2_GetFloat(file, "SaveZ");
Life = DOF2_GetFloat(file, "Vida");
Colete = DOF2_GetFloat(file, "Colete");
PlayerInfo[playerid][pCarId] = DOF2_GetInt(file, "0Modelo");
PlayerInfo[playerid][pCor1] =DOF2_GetInt(file, "0Cor1");
PlayerInfo[playerid][pCor2] =DOF2_GetInt(file, "0Cor2");
PlayerInfo[playerid][pCX] = DOF2_GetFloat(file, "0X");
PlayerInfo[playerid][pCY] = DOF2_GetFloat(file, "0Y");
PlayerInfo[playerid][pCZ] = DOF2_GetFloat(file, "0Z");
PlayerInfo[playerid][pAngulo] = DOF2_GetFloat(file, "0Angulo");
PlayerInfo[playerid][pVida] = DOF2_GetFloat(file, "0Vida");
PlayerInfo[playerid][pGas] = DOF2_GetInt(file, "0Gasolina");
PlayerInfo[playerid][pComponente0] = DOF2_GetInt(file, "Componente0");
PlayerInfo[playerid][pComponente1] = DOF2_GetInt(file, "Componente1");
PlayerInfo[playerid][pComponente2] = DOF2_GetInt(file, "Componente2");
PlayerInfo[playerid][pComponente3] = DOF2_GetInt(file, "Componente3");
PlayerInfo[playerid][pComponente4] = DOF2_GetInt(file, "Componente4");
PlayerInfo[playerid][pComponente5] = DOF2_GetInt(file, "Componente5");
PlayerInfo[playerid][pComponente6] = DOF2_GetInt(file, "Componente6");
PlayerInfo[playerid][pComponente7] = DOF2_GetInt(file, "Componente7");
PlayerInfo[playerid][pComponente8] = DOF2_GetInt(file, "Componente8");
PlayerInfo[playerid][pComponente9] = DOF2_GetInt(file, "Componente9");
PlayerInfo[playerid][pComponente10] = DOF2_GetInt(file, "Componente10");
PlayerInfo[playerid][pComponente11] = DOF2_GetInt(file, "Componente11");
PlayerInfo[playerid][pComponente12] = DOF2_GetInt(file, "Componente12");
PlayerInfo[playerid][pComponente13] = DOF2_GetInt(file, "Componente13");
PlayerInfo[playerid][pLataria] = DOF2_GetInt(file, "0Lataria");
PlayerInfo[playerid][pLuz] = DOF2_GetInt(file, "0Luz");
PlayerInfo[playerid][pPorta] = DOF2_GetInt(file, "0Porta");
PlayerInfo[playerid][pPneu] = DOF2_GetInt(file, "0Pneu");
carro[playerid] = CreateVehicle(PlayerInfo[playerid][pCarId], PlayerInfo[playerid][pCX], PlayerInfo[playerid][pCY], PlayerInfo[playerid][pCZ], PlayerInfo[playerid][pAngulo], PlayerInfo[playerid][pCor1], PlayerInfo[playerid][pCor2], 600*1000);
SetVehicleNumberPlate(carro[playerid], DOF2_GetString(file, "0Placa"));
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente0]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente1]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente2]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente3]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente4]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente5]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente6]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente7]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente8]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente9]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente10]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente11]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente12]);
AddVehicleComponent(carro[playerid], PlayerInfo[playerid][pComponente13]);
UpdateVehicleDamageStatus(carro[playerid], PlayerInfo[playerid][pLataria], PlayerInfo[playerid][pLuz], PlayerInfo[playerid][pPorta], PlayerInfo[playerid][pPneu]);
SetVehicleHealth(carro[playerid], PlayerInfo[playerid][pVida]);
ChangeVehicleColor(carro[playerid], PlayerInfo[playerid][pCor1], PlayerInfo[playerid][pCor2]);
Gasolina[carro[playerid]] = PlayerInfo[playerid][pGas];
//------------------
}
else
{
format(string, sizeof(string), "Usuario: %s \n\n{FFFFFF} Senha incorreta, digite \na senha correta para logar",aname);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF0000}Conta", string, "Proximo", "Sair");
}
}
//----
}
if(dialogid == DIALOG_COR)
{
if(response)
{
switch(listitem)
{
case 0: {PlayerInfo[playerid][pCor1] = 3; ShowPlayerDialog(playerid, DIALOG_COOR, DIALOG_STYLE_LIST, "Escolha cor 2 de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");}
case 1: {PlayerInfo[playerid][pCor1] = 2; ShowPlayerDialog(playerid, DIALOG_COOR, DIALOG_STYLE_LIST, "Escolha cor 2 de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");}
case 2: {PlayerInfo[playerid][pCor1] = 6; ShowPlayerDialog(playerid, DIALOG_COOR, DIALOG_STYLE_LIST, "Escolha cor 2 de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");}
case 3: {PlayerInfo[playerid][pCor1] = 86; ShowPlayerDialog(playerid, DIALOG_COOR, DIALOG_STYLE_LIST, "Escolha cor 2 de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");}
case 4: {PlayerInfo[playerid][pCor1] = 126; ShowPlayerDialog(playerid, DIALOG_COOR, DIALOG_STYLE_LIST, "Escolha cor 2 de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");}
case 5: {PlayerInfo[playerid][pCor1] = 1; ShowPlayerDialog(playerid, DIALOG_COOR, DIALOG_STYLE_LIST, "Escolha cor 2 de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");}
case 6: {PlayerInfo[playerid][pCor1] = 0; ShowPlayerDialog(playerid, DIALOG_COOR, DIALOG_STYLE_LIST, "Escolha cor 2 de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");}
case 7: {PlayerInfo[playerid][pCor1] = 35; ShowPlayerDialog(playerid, DIALOG_COOR, DIALOG_STYLE_LIST, "Escolha cor 2 de seu veiculo!", "Vermelho \n Azul \n Amarelo \n Verde \n Rosa \n Branco \n Preto \n Cinza", "Proximo", "");}
}
}
}
if(dialogid == DIALOG_COOR)
{
if(response)
{
switch(listitem)
{
case 0: {PlayerInfo[playerid][pCor2] = 3; SetTimerEx("MostrarCarro", 900, false, "i", playerid);}
case 1: {PlayerInfo[playerid][pCor2] = 2; SetTimerEx("MostrarCarro", 900, false, "i", playerid);}
case 2: {PlayerInfo[playerid][pCor2] = 6; SetTimerEx("MostrarCarro", 900, false, "i", playerid);}
case 4: {PlayerInfo[playerid][pCor2] = 126;SetTimerEx("MostrarCarro", 900, false, "i", playerid);}
case 5: {PlayerInfo[playerid][pCor2] = 1; SetTimerEx("MostrarCarro", 900, false, "i", playerid);}
case 6: {PlayerInfo[playerid][pCor2] = 0; SetTimerEx("MostrarCarro", 900, false, "i", playerid);}
case 7: {PlayerInfo[playerid][pCor2] = 35; SetTimerEx("MostrarCarro", 900, false, "i", playerid);}
}
}
}
return 1;
}
PHP код:
forward MostrarCarro(playerid);
public MostrarCarro(playerid)
{
botao[0] = TextDrawCreate(273.000000, 229.833297, "Comprar");
TextDrawLetterSize(botao[0], 0.449999, 1.600000);
TextDrawAlignment(botao[0], 1);
TextDrawColor(botao[0], -5963521);
TextDrawSetShadow(botao[0], 0);
TextDrawSetOutline(botao[0], 1);
TextDrawBackgroundColor(botao[0], 51);
TextDrawFont(botao[0], 1);
TextDrawSetProportional(botao[0], 1);
TextDrawSetSelectable(botao[0], true);
botao[1] = TextDrawCreate(343.000000, 229.833328, "Cancelar");
TextDrawLetterSize(botao[1], 0.449999, 1.600000);
TextDrawAlignment(botao[1], 1);
TextDrawColor(botao[1], -5963521);
TextDrawSetShadow(botao[1], 0);
TextDrawSetOutline(botao[1], 1);
TextDrawBackgroundColor(botao[1], 51);
TextDrawFont(botao[1], 1);
TextDrawSetProportional(botao[1], 1);
TextDrawSetSelectable(botao[1], true);
Pre[0] = CreatePlayerTextDraw(playerid, 304.000000, 144.000000, "_");
PlayerTextDrawFont(playerid, Pre[0], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawUseBox(playerid, Pre[0], 1);
PlayerTextDrawBoxColor(playerid, Pre[0], -2139062017);
PlayerTextDrawTextSize(playerid, Pre[0], 70, 80);
PlayerTextDrawSetPreviewModel(playerid, Pre[0], PlayerInfo[playerid][pCarId]);
PlayerTextDrawSetPreviewRot(playerid, Pre[0], -20.0, 0.0, -50.0, 1.0);
PlayerTextDrawSetSelectable(playerid, Pre[0], true);
PlayerTextDrawSetPreviewVehCol(playerid, Pre[0], PlayerInfo[playerid][pCor1], PlayerInfo[playerid][pCor2]);
PlayerTextDrawShow(playerid, Pre[0]);
TextDrawShowForPlayer(playerid, botao[0]);
TextDrawShowForPlayer(playerid, botao[1]);
return 1;
}
PHP код:
stock CriarCarro(playerid)
{
new x = random(26);
new y = random(26);
new z = random(26);
new numero1 = random(9);
new numero2 = random(9);
new numero3 = random(9);
new numero4 = random(9);
format(PlayerInfo[playerid][pPlaca], 8, "%s%s%s-%d%d%d%d", Letra[x],Letra[y],Letra[z],numero1,numero2,numero3,numero4);
PlayerTextDrawHide(playerid, Pre[0]);
CancelSelectTextDraw(playerid);
GivePlayerMoney(playerid, -valorcarro[playerid]);
TextDrawHideForPlayer(playerid, botao[0]);
TextDrawHideForPlayer(playerid, botao[1]);
new aname[25];
GetPlayerName(playerid,aname,sizeof(aname));
new file[500];
format(file,sizeof(file),"Contas/%s.txt",aname);
DOF2_SetInt(file, "0Modelo", PlayerInfo[playerid][pCarId]);
DOF2_SetInt(file, "0Cor1", PlayerInfo[playerid][pCor1]);
DOF2_SetInt(file, "0Cor2", PlayerInfo[playerid][pCor2]);
DOF2_SetInt(file, "0Gasolina", PlayerInfo[playerid][pGas] = 100);
DOF2_SetString(file, "0Placa", PlayerInfo[playerid][pPlaca]);
DOF2_SetFloat(file, "0X", PlayerInfo[playerid][pCX]);
DOF2_SetFloat(file, "0Y", PlayerInfo[playerid][pCY]);
DOF2_SetFloat(file, "0Z", PlayerInfo[playerid][pCZ]);
DOF2_SetFloat(file, "0Angulo", PlayerInfo[playerid][pAngulo]);
DOF2_SaveFile();
carro[playerid] = CreateVehicle(PlayerInfo[playerid][pCarId], 0, 0, 3, 0, PlayerInfo[playerid][pCor1], PlayerInfo[playerid][pCor2], 600*1000);
SetVehicleNumberPlate(carro[playerid], PlayerInfo[playerid][pPlaca]);
return 1;
}
//------------------------------------------------------------------------------
stock salvardados(playerid)
{
new aname[25];
GetPlayerName(playerid,aname,sizeof(aname));
new file[500];
format(file,sizeof(file),"Contas/%s.txt",aname);
GetPlayerPos(playerid, SaveX, SaveY, SaveZ);
GetPlayerHealth(playerid, Life);
GetPlayerArmour(playerid, Colete);
//-------
DOF2_SetInt(file,"Admin",PlayerInfo[playerid][pAdmin]);
DOF2_SetInt(file,"Skin",GetPlayerSkin(playerid));
DOF2_SetInt(file,"Dinheiro",GetPlayerMoney(playerid));
DOF2_SetFloat(file,"SaveX",SaveX);
DOF2_SetFloat(file,"SaveY",SaveY);
DOF2_SetFloat(file,"SaveZ",SaveZ);
DOF2_SetFloat(file,"Vida",Life);
DOF2_SetFloat(file,"Colete",Colete);
DOF2_SaveFile();
if(carro[playerid] > 0)
{
GetVehiclePos(carro[playerid], PlayerInfo[playerid][pCX], PlayerInfo[playerid][pCY], PlayerInfo[playerid][pCZ]);
GetVehicleZAngle(carro[playerid], PlayerInfo[playerid][pAngulo]);
GetVehicleHealth(carro[playerid], PlayerInfo[playerid][pVida]);
PlayerInfo[playerid][pGas] = Gasolina[carro[playerid]];
PlayerInfo[playerid][pComponente0] = GetVehicleComponentInSlot(carro[playerid], 0);
PlayerInfo[playerid][pComponente1] = GetVehicleComponentInSlot(carro[playerid], 1);
PlayerInfo[playerid][pComponente2] = GetVehicleComponentInSlot(carro[playerid], 2);
PlayerInfo[playerid][pComponente3] = GetVehicleComponentInSlot(carro[playerid], 3);
PlayerInfo[playerid][pComponente4] = GetVehicleComponentInSlot(carro[playerid], 4);
PlayerInfo[playerid][pComponente5] = GetVehicleComponentInSlot(carro[playerid], 5);
PlayerInfo[playerid][pComponente6] = GetVehicleComponentInSlot(carro[playerid], 6);
PlayerInfo[playerid][pComponente7] = GetVehicleComponentInSlot(carro[playerid], 7);
PlayerInfo[playerid][pComponente8] = GetVehicleComponentInSlot(carro[playerid], 8);
PlayerInfo[playerid][pComponente9] = GetVehicleComponentInSlot(carro[playerid], 9);
PlayerInfo[playerid][pComponente10] = GetVehicleComponentInSlot(carro[playerid], 10);
PlayerInfo[playerid][pComponente11] = GetVehicleComponentInSlot(carro[playerid], 11);
PlayerInfo[playerid][pComponente12] = GetVehicleComponentInSlot(carro[playerid], 12);
PlayerInfo[playerid][pComponente13] = GetVehicleComponentInSlot(carro[playerid], 13);
DOF2_SetFloat(file, "0X", PlayerInfo[playerid][pCX]);
DOF2_SetFloat(file, "0Y", PlayerInfo[playerid][pCY]);
DOF2_SetFloat(file, "0Z", PlayerInfo[playerid][pCZ]);
DOF2_SetFloat(file, "0Angulo", PlayerInfo[playerid][pAngulo]);
DOF2_SetFloat(file, "0Vida", PlayerInfo[playerid][pVida]);
DOF2_SetInt(file, "0Gasolina", PlayerInfo[playerid][pGas]);
DOF2_SetInt(file, "Componente0", PlayerInfo[playerid][pComponente0]);
DOF2_SetInt(file, "Componente1", PlayerInfo[playerid][pComponente1]);
DOF2_SetInt(file, "Componente2", PlayerInfo[playerid][pComponente2]);
DOF2_SetInt(file, "Componente3", PlayerInfo[playerid][pComponente3]);
DOF2_SetInt(file, "Componente4", PlayerInfo[playerid][pComponente4]);
DOF2_SetInt(file, "Componente5", PlayerInfo[playerid][pComponente5]);
DOF2_SetInt(file, "Componente6", PlayerInfo[playerid][pComponente6]);
DOF2_SetInt(file, "Componente7", PlayerInfo[playerid][pComponente7]);
DOF2_SetInt(file, "Componente8", PlayerInfo[playerid][pComponente8]);
DOF2_SetInt(file, "Componente9", PlayerInfo[playerid][pComponente9]);
DOF2_SetInt(file, "Componente10", PlayerInfo[playerid][pComponente10]);
DOF2_SetInt(file, "Componente11", PlayerInfo[playerid][pComponente11]);
DOF2_SetInt(file, "Componente12", PlayerInfo[playerid][pComponente12]);
DOF2_SetInt(file, "Componente13", PlayerInfo[playerid][pComponente13]);
GetVehicleDamageStatus(carro[playerid], PlayerInfo[playerid][pLataria], PlayerInfo[playerid][pLuz], PlayerInfo[playerid][pPorta], PlayerInfo[playerid][pPneu]);
DOF2_SetInt(file, "0Lataria", PlayerInfo[playerid][pLataria]);
DOF2_SetInt(file, "0Luz", PlayerInfo[playerid][pLuz]);
DOF2_SetInt(file, "0Porta", PlayerInfo[playerid][pPorta]);
DOF2_SetInt(file, "0Pneu", PlayerInfo[playerid][pPneu]);
DOF2_SaveFile();
}
return 1;
}