Sempre que entro na oficina pra tunar, ou uso o comando /tunar e modifico o carro, instantaneamente o jogo trava totalmente! Peзo que se alguem for me ajudar, nгo postar sу a correзгo dos cуdigos, mas sim tambйm explicar o que foi mudado e o pq... (Quero aprender tambйm rs)
Код:
if(dialogid == tunarroda) // Rodas
{
if(response)
{
if(listitem == 0) // Estilo 1
{
AddVehicleComponent(car,1084);
}
if(listitem == 1) // Estilo 2
{
AddVehicleComponent(car,1073);
}
if(listitem == 2) // Estilo 3
{
AddVehicleComponent(car,1075);
}
if(listitem == 3) // Estilo 4
{
AddVehicleComponent(car,1077);
}
if(listitem == 4) // Estilo 5
{
AddVehicleComponent(car,1079);
}
if(listitem == 5) // Estilo 6
{
AddVehicleComponent(car,1080);
}
if(listitem == 6) // Voltar
{
ShowPlayerDialog(playerid, tunar, DIALOG_STYLE_LIST, "Tuning Menu", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Instalar", "Cancelar");
TogglePlayerControllable(playerid, 1);
}
}
return 1;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~======
if(dialogid == tunarcor) // Cores
{
if(response)
{
if(listitem == 0) // Preto
{
ChangeVehicleColor(car,0,0);
}
if(listitem == 1) // Branco
{
ChangeVehicleColor(car,1,1);
}
if(listitem == 2) // Azul Escuro
{
ChangeVehicleColor(car,425,425);
}
if(listitem == 3) // Azul Claro
{
ChangeVehicleColor(car,2,2);
}
if(listitem == 4) // Verde
{
ChangeVehicleColor(car,16,16);
}
if(listitem == 5) // Vermelho
{
ChangeVehicleColor(car,3,3);
}
if(listitem == 6) // Amarelo
{
ChangeVehicleColor(car,6,6);
}
if(listitem == 7) // Rosa
{
ChangeVehicleColor(car,146,146);
}
if(listitem == 8) // Voltar
{
ShowPlayerDialog(playerid, tunar, DIALOG_STYLE_LIST, "Tuning Menu", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Pintar", "Cancelar");
TogglePlayerControllable(playerid, 1);
}
}
return 1;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~======
// radio bcr http://live.hunterfm.com:8080/
if(dialogid == tunarpaint) // Paintjobs
{
if(response)
{
if(listitem == 0) // Estilo 1
{
ChangeVehiclePaintjob(car,0);
}
if(listitem == 1) // Estilo 2
{
ChangeVehiclePaintjob(car,1);
}
if(listitem == 2) // Estilo 3
{
ChangeVehiclePaintjob(car,2);
}
if(listitem == 4) // Voltar
{
ShowPlayerDialog(playerid, tunar, DIALOG_STYLE_LIST, "Tuning Menu", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Pintar", "Cancelar");
TogglePlayerControllable(playerid, 1);
}
}
if(dialogid == NEON)
{
if(response)
{
if(listitem == 0)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "[BVC] ~w~Neon ~b~Azul ~w~ativo.",3500,5);
}
if(listitem == 1)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "[BVC] ~~w~Neon ~g~Verde ~w~ativo.",3500,5);
}
if(listitem == 2)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "[BVC] ~w~Neon ~y~Amarelo ~w~ativo.",3500,5);
}
if(listitem == 3)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "[BVC] ~w~Neon Branco ~w~ativo.",3500,5);
}
if(listitem == 4)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "[BVC] ~w~Neon ~p~Roxo ~w~ativo.",3500,5);
}
if(listitem == 5)
{
DestroyObject(GetPVarInt(playerid, "blue"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "blue1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "green"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "green1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "yellow"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "yellow1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "white"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "white1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink1"));
DeletePVar(playerid, "neon");
GameTextForPlayer(playerid, "~r~ Neon desligado.",3500,5);
}
}
}
Acho que esses sгo os principais cуdigos ligados ao tuning... Me ajudem por favor, preciso arrumar isso urgente...