DuFraN Posted April 28, 2013 Share Posted April 28, 2013 Hola... Estoy haciendo un script para que cuando toque un marker el vehiculo se pare con el setElementFrozen pero a determinado tiempo deje de estar congelado con el setTimer, lo estube haciendo pero no me funciona una parte, este es mi .lua. Que hago mal? local Congelado = createMarker (3047.3000488281,-1671.6999511719,7.8000001907349,"corona",10,255,255,255,255) function Hielo ( thePlayer ) if getPedOccupiedVehicle ( thePlayer ) then local playerVehicle = getPlayerOccupiedVehicle ( thePlayer ) setElementFrozen ( playerVehicle, true ) setTimer ( Hielo, 10000,1, "Congelado" ) setElementFrozen ( playerVehicle, false ) end end addEventHandler("onClientMarkerHit",getRootElement(),Hielo) Link to comment
Renkon Posted April 28, 2013 Share Posted April 28, 2013 local Congelado = createMarker (3047.3000488281,-1671.6999511719,7.8000001907349,"corona",10,255,255,255,255) function desHielo (thePlayer) setElementFrozen(getPlayerOccupiedVehicle ( thePlayer ), false) end function Hielo ( thePlayer ) if getPedOccupiedVehicle ( thePlayer ) then local playerVehicle = getPlayerOccupiedVehicle ( thePlayer ) setElementFrozen ( playerVehicle, true ) setTimer ( desHielo, 10000,1, thePlayer ) end end addEventHandler("onClientMarkerHit",getRootElement(),Hielo) Link to comment
Sasu Posted April 28, 2013 Share Posted April 28, 2013 Usas una funcion que se eliminara. Usa: getPedOccupiedVehicle en vez de getPlayerOccupiedVehicle. Link to comment
Recommended Posts