10.09.2017, 13:18
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
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; } |
This function does not work on unoccupied vehicles (It is believed to be a GTA limitation). |
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. |