Poloman Posted August 1, 2013 Share Posted August 1, 2013 Hola soy nuevo en el foro y tengo un problema, el problema es el siguiente: Cuando empiezo el mapa el script handling.lua funciona perfectamente pero cuando presiono enter o muero (respawn) el script deja de funcionar, espero que ustedes me ayuden quizas tenga facil solución pero yo no soy tan bueno como ustedes, espero que me resuelvan el problema gracias y un saludo. (Estamos hablando del gamemode race) function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end addEventHandler("onResourceStart", resourceRoot, handlingChange) Link to comment
Plate Posted August 1, 2013 Share Posted August 1, 2013 function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end addEventHandler("onResourceStart", resourceRoot, handlingChange) addEventHandler("onVehicleRespawn", resourceRoot, handlingChange) Link to comment
Poloman Posted August 1, 2013 Author Share Posted August 1, 2013 function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end addEventHandler("onResourceStart", resourceRoot, handlingChange) addEventHandler("onVehicleRespawn", resourceRoot, handlingChange) No funciona Link to comment
EstrategiaGTA Posted August 1, 2013 Share Posted August 1, 2013 function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end setTimer ( handlingChange, 50, 0) Link to comment
Poloman Posted August 1, 2013 Author Share Posted August 1, 2013 function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end setTimer ( handlingChange, 50, 0) Esto es frustrante, gracias a los dos por intentarlo pero cada vez que muero y hago el respawn, se vuelve al handling original del coche y no al del script... Link to comment
Plate Posted August 1, 2013 Share Posted August 1, 2013 function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end setTimer ( handlingChange, 50, 0) Esto es frustrante, gracias a los dos por intentarlo pero cada vez que muero y hago el respawn, se vuelve al handling original del coche y no al del script... AHHh cada ves que respawneas vos yo pense que cada ves que respawneaba el vehiculo function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end addEventHandler("onResourceStart", root, handlingChange) addEventHandler("onPlayerSpawn", root, handlingChange) Fijate si funciona Link to comment
Poloman Posted August 1, 2013 Author Share Posted August 1, 2013 function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end setTimer ( handlingChange, 50, 0) Esto es frustrante, gracias a los dos por intentarlo pero cada vez que muero y hago el respawn, se vuelve al handling original del coche y no al del script... AHHh cada ves que respawneas vos yo pense que cada ves que respawneaba el vehiculo function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end addEventHandler("onResourceStart", root, handlingChange) addEventHandler("onPlayerSpawn", root, handlingChange) Fijate si funciona No, no, jeje fijate arriba estoy hablando del gamemode race, osea que es cuando el coche hace el respawn no funciona el script. Link to comment
AlvareZ_ Posted August 1, 2013 Share Posted August 1, 2013 Ni idea function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end addEventHandler("onResourceStart", root, handlingChange) bindKey ( source, "TeclaDelRespawn", "down", handlingChange ) -- En tecla del Respawn poner la tecla con la que respawnea el vehiculo por ejemplo "space" o "F1" Link to comment
Poloman Posted August 6, 2013 Author Share Posted August 6, 2013 Entonces no hay ninguna solución? Link to comment
BorderLine Posted August 6, 2013 Share Posted August 6, 2013 intenta usando onVehicleEnter Link to comment
Arsilex Posted August 6, 2013 Share Posted August 6, 2013 function handlingChange() setModelHandling(423, "mass", 10000.0) setModelHandling(423, "turnMass", 50000.0) setModelHandling(423, "dragCoeff", 2.0) setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) setModelHandling(423, "percentSubmerged", 80) setModelHandling(423, "tractionMultiplier", 0.70) setModelHandling(423, "tractionLoss", 0.9) setModelHandling(423, "tractionBias", 0.5) setModelHandling(423, "numberOfGears", 5) setModelHandling(423, "maxVelocity", 154.0) setModelHandling(423, "engineAcceleration", 35.0) setModelHandling(423, "engineInertia", 10.0) setModelHandling(423, "driveType", "awd") setModelHandling(423, "engineType", "petrol") setModelHandling(423, "brakeDeceleration", 11.0) setModelHandling(423, "brakeBias", 0.45) setModelHandling(423, "ABS", false) setModelHandling(423, "steeringLock", 30.0) setModelHandling(423, "suspensionForceLevel", 1.4) setModelHandling(423, "suspensionDamping", 0.10) setModelHandling(423, "suspensionHighSpeedDamping", 0.0) setModelHandling(423, "suspensionUpperLimit", 0.40) setModelHandling(423, "suspensionLowerLimit", -0.40) setModelHandling(423, "suspensionFrontRearBias", 0.5) setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) setModelHandling(423, "seatOffsetDistance", 0.20) setModelHandling(423, "collisionDamageMultiplier", 0.20) setModelHandling(423, "monetary", 35000) setModelHandling(423, "modelFlags", 0x40006800) setModelHandling(423, "handlingFlags", 0x1300005) setModelHandling(423, "headLight", 9) setModelHandling(423, "tailLight", 1) setModelHandling(423, "animGroup", 0) end addEventHandler("onResourceStart", root, handlingChange) function () setTimer( function() if isPedInVehicle ( source ) handlingChange() end end,5000,1, source) end addEvent ( "onPlayerRaceWasted", true ) addEventHandler("onPlayerRaceWasted", root, ) Link to comment
KatastrofaS Posted August 6, 2013 Share Posted August 6, 2013 addEventHandler("onPlayerVehicleEnter",getRootElement(), function(veh) if (getElementModel(veh) == 551) then setVehicleHandling(veh,"suspensionLowerLimit",-0.12) setVehicleHandling(veh,"suspensionFrontRearBias",0.5) end end) Link to comment
Arsilex Posted August 6, 2013 Share Posted August 6, 2013 En race el player no entra al coche. Link to comment
BorderLine Posted August 6, 2013 Share Posted August 6, 2013 en la funcion del spawn si, usa onVehicleEnter. Link to comment
Recommended Posts