LatinNetworks Posted October 18, 2016 Share Posted October 18, 2016 Hola chicos, alguien sabe como puedo hacer para que las putas funcionen? ID: 2899 y 2892 Link to comment
LatinNetworks Posted October 18, 2016 Author Share Posted October 18, 2016 5 hours ago, LatinNetworks said: Hola chicos, alguien sabe como puedo hacer para que las pullas funcionen? ID: 2899 y 2892 Link to comment
Anzo Posted October 18, 2016 Share Posted October 18, 2016 (edited) Si quieres que las púas pinchen las ruedas de los autos creo que una forma de hacerlo seria crear una colshape con la posición del objeto y cuando un auto entre, usas esto: set setVehicleWheelState No sé si esa era la función pero sé que había una que cambiaba el estado de las ruedas, buscala Edited October 18, 2016 by Anzo Link to comment
Tomas Posted October 18, 2016 Share Posted October 18, 2016 Te dejo un trozo de un script que hace lo que buscas (hay partes que no te servirán y será necesario que las borres). addCommandHandler ("strip", function ( player ) if ( isElement(spike [ player ])) then return end local div = exports.GTIemployment:getPlayerJobDivision(player) if ( player and not isPedInVehicle ( player ) and div == "Highway Patrol" and isPedOnGround ( player ) and getElementDimension ( player ) == 0 and stingers == false ) then local x, y, z = getElementPosition ( player ) local xr, yr, zr = getElementRotation ( player ) spike [ player ] = createObject ( 2899, x, y, z-0.875, xr, yr, zr ) owner[spike] = player exports.GTIanims:setJobAnimation(player, "BOMBER", "BOM_Plant", 2500, false, false, true, false ) destroySpike = setTimer ( destroySpikes, 180000, 1, player ) local x2, y2, z2 = getElementPosition ( spike [ player ] ) blow [ player ] = createColSphere(x2, y2, z2,3) owner[ blow[player] ] = player local sx,sy,sz = getElementRotation(spike[player]) setElementRotation(blow[player],sx,sy,sz) addEventHandler("onColShapeHit", blow[player], onHitTheStrip) addEventHandler("onColShapeLeave", blow[player], onLeaveTheStrip) addEventHandler ("onColShapeHit", blow [ player ], function ( player ) if ( exports.GTIpoliceWanted:getPlayerWantedLevel ( player ) <=0 ) then return end if player and getElementType ( player ) == "player" then if isPedInVehicle ( player ) then local pveh = getPedOccupiedVehicle ( player ) setVehicleWheelStates ( pveh, 1, 1, 1, 1 ) end end end) end end) Link to comment
Recommended Posts