Problema con el angle de los vehнculos
#1

Cuando aparcу un coche este se queda bien pero cuando respawnneo se guarda la posiciуn menos el angle, sуlo cuando reinicio el sv en angle del coche se arregla
Reply
#2

Al menos cita tu cуdigo para que le tiremos una ojeada.
Reply
#3

Este es mi OnvehicleSpawn.

Quote:

public OnVehicleSpawn(vehicleid)
{
if(GetVehicleModel(vehicleid) == 528 ) //aca puse un espacio para poder publicarlo ya que el foro agrega un emoji.
{
SetVehicleHealthEx(vehicleid, 2000);
}
CargaDelCamion[vehicleid] = 0;
luzlanewestado[vehicleid] = 0;
luzlanews1[vehicleid] = 0;
luzlanews2[vehicleid] = 0;
luzlanews3[vehicleid] = 0;
luzlanews4[vehicleid] = 0;
DestroyObject(luzlanews1[vehicleid]);
DestroyObject(luzlanews2[vehicleid]);
DestroyObject(luzlanews3[vehicleid]);
DestroyObject(luzlanews4[vehicleid]);
DestroyDynamicObject(LuzSS[0][vehicleid]);
DestroyDynamicObject(LuzSS[1][vehicleid]);
DestroyDynamicObject(LuzSS[2][vehicleid]);
DestroyDynamicObject(LuzSS[3][vehicleid]);
SinSonido[vehicleid] = 0;
VehAlquilado[vehicleid] = 0;
AutoInfo[vehicleid][aMotor] = 0;

if(VehExploto[vehicleid] == 1)
{
SetVehicleHealthEx(vehicleid, 350.0);
AutoInfo[vehicleid][aRoto] = 1;
UpdateVehicleDamageStatus(vehicleid, 3565161, 33554946, 4, 0);
}
SetVehiclePos(vehicleid, AutoInfo[vehicleid][ax], AutoInfo[vehicleid][ay], AutoInfo[vehicleid][az]);
SetVehicleZAngle(vehicleid, AutoInfo[vehicleid][aa]);
LinkVehicleToInterior(vehicleid, AutoInfo[vehicleid][aInteriorID]);
new matricula[40];
format(matricula, sizeof(matricula), "LS-%d", AutoInfo[vehicleid][aID]);
SetVehicleNumberPlate(vehicleid, matricula);
SetTimerEx("SetVehicleZAngle", 1500, false, "i", vehicleid);
return 1;
}

Reply
#4

SetVehicleZAngle no funciona en vehнculos vacнos, lo dice la wiki.

https://sampwiki.blast.hk/wiki/SetVehicleZAngle
Quote:

This function does not work on unoccupied vehicles (It is believed to be a GTA limitation).

Lo que debes hacer es eliminar y crear de nuevo el vehнculo con las coordenadas y el бngulo.
Reply
#5

Brother cuando aparco el vehiculo deberia guardarse el angle pero no se guarda y para aparcarlo obvio debo estar dentro de el.
Reply
#6

Es que no sabes leer o que
Quote:
Originally Posted by GlobitoPawn
Посмотреть сообщение
SetVehicleZAngle no funciona en vehнculos vacнos, lo dice la wiki.

https://sampwiki.blast.hk/wiki/SetVehicleZAngle


Lo que debes hacer es eliminar y crear de nuevo el vehнculo con las coordenadas y el бngulo.
Al re-spawnear el vehнculo se pondrб el бngulo que le dio en CreateVehicle
Otra soluciуn podrнa ser usar un npc pero habrнa que probar si eso es viable.
Reply
#7

Incluso con los autos ya creados, cuando uso /aparcar que respawnneo los autos, estos no se ponen en el angulo en el que los aparque.

cuando reinicio el servidor si se ponen en el angle que les corresponde
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)