depato123 Posted December 17, 2013 Share Posted December 17, 2013 Hola, tengo este script en serverside: function motores ( thePlayer, modo) local vehicle = getPedOccupiedVehicle( thePlayer ) if vehicle then if modo then Motor = getVehicleOriginalProperty( vehicle, "engineAcceleration") modoz = (((modo*2) * Motor) / 100) + Motor if setVehicleHandling ( vehicle, ) then outputChatBox("El motor se instalo satisfactoriamente de ".. Motor.. " a ".. modo , thePlayer, 0, 255, 0) else outputChatBox("Error el motor no se instalo", thePlayer, 0, 255, 0) end end end end addEvent( "onMotor", true ) addEventHandler( "onMotor", getRootElement(), motores) esta tiggreado y el problema es que no se como rellenar lo de setVehicleHandling ( vehicle, ... ) then Alguien me da un ejemplo de modificar un handling original de un auto? Link to comment
MTA Team 0xCiBeR Posted December 17, 2013 MTA Team Share Posted December 17, 2013 Un ejemplo function masa(yo,cmd,valor) if valor then local veh = getPedOccupiedVehicle ( yo ) -- obtener el auto local variable = tonumber(valor) setVehicleHandling ( veh, "mass", variable ) end end addCommandHandler ( "cambiarmasa", masa)--El comando seria /cambiarmasa [Nuevo valor de Masa] Otro ejemplo: function hand(yo,cmd,propiedad,valor) if propiedad and valor then local veh = getPedOccupiedVehicle ( yo ) -- obtener el auto local variable = tonumber(valor) setVehicleHandling ( veh, propiedad, variable ) end end addCommandHandler ( "hand", hand)--El comando seria /hand [propiedad a cambiar][valor de la propiedad] Tambien podes usar:(para modificar el handling para todos los autos de ese modelo) bool setModelHandling ( int modelId, [ string property, var value ] ) Link to comment
MTA Team 0xCiBeR Posted December 18, 2013 MTA Team Share Posted December 18, 2013 De nada Link to comment
Recommended Posts