Jump to content

Ayuda con este script!


Flipi

Recommended Posts

Hola necesito ayuda con mi script, no me funciona el flip..

function flip(thePlayer) 
   local Vehiculo = getPedOccupiedVehicle(thePlayer) 
    if Vehiculo then 
    outputChatBox("#0080FFVehiculo volteado!",thePlayer, 0,128,255, true) 
     flip(Vehiculo) 
     playSoundFrontEnd ( thePlayer, 101 ) 
     else 
   outputChatBox("#0080FFNo tienes un vehiculo para voltearlo!",thePlayer, 0,128,255, true) 
     end 
end 
  
addEventHandler("onPlayerJoin",root,function() 
     bindKey(source,"3", "down", flip) 
end) 
  
function onStart() 
  for id, players in ipairs(getElementsByType("player")) do 
    bindKey(players ,"3", "down", flip) 
  end 
end 

Link to comment
function buyFlip(p) 
    if (isPedInVehicle(p)) then 
        local v = getPedOccupiedVehicle(p) 
            local x, y, z = getElementRotation (v) 
            setElementRotation (v, 0, 0, (x > 90 and x < 270) and (z + 180) or z) 
end 
end 
addCommandHandler("flip", buyFlip) 

hazte una idea con eso

Link to comment
function buyFlip(p) 
    if (isPedInVehicle(p)) then 
        local v = getPedOccupiedVehicle(p) 
            local x, y, z = getElementRotation (v) 
            setElementRotation (v, 0, 0, (x > 90 and x < 270) and (z + 180) or z) 
end 
end 
addCommandHandler("flip", buyFlip) 

hazte una idea con eso

funciona pero tira error un error en la parte de la linea 2

function flip(thePlayer) 
    local Vehiculo = getPedOccupiedVehicle(thePlayer) 
    if Vehiculo then 
    outputChatBox("#0080FFVehiculo volteado!",thePlayer, 0,128,255, true) 
     flip(Vehiculo) 
            local x, y, z = getElementRotation (Vehiculo) 
            setElementRotation (Vehiculo, 0, 0, (x > 90 and x < 270) and (z + 180) or z) 
      playSoundFrontEnd ( thePlayer, 101 ) 
     else 
   outputChatBox("#0080FFNo tienes un vehiculo para voltearlo!",thePlayer, 0,128,255, true) 
     end 
end 
  
addEventHandler("onPlayerJoin",root,function() 
     bindKey(source,"3", "down", flip) 
end) 
  
function onStart() 
  for id, players in ipairs(getElementsByType("player")) do 
    bindKey(players ,"3", "down", flip) 
  end 
end 

Link to comment
function flip(thePlayer) 
    local Vehiculo = getPedOccupiedVehicle(thePlayer) 
    if Vehiculo then 
            local x, y, z = getElementRotation (Vehiculo) 
            setElementRotation (Vehiculo, 0, 0, (x > 90 and x < 270) and (z + 180) or z) 
      playSoundFrontEnd ( thePlayer, 101 ) 
      outputChatBox("#0080FFVehiculo volteado!",thePlayer, 0,128,255, true) 
     else 
   outputChatBox("#0080FFNo tienes un vehiculo para voltearlo!",thePlayer, 0,128,255, true) 
     end 
end 
  
addEventHandler("onPlayerJoin",root,function() 
     bindKey(source,"3", "down", flip) 
end) 
  
function onStart() 
  for id, players in ipairs(getElementsByType("player")) do 
    bindKey(players ,"3", "down", flip) 
  end 
end 

Link to comment
function flip(thePlayer) 
    local Vehiculo = getPedOccupiedVehicle(thePlayer) 
    if Vehiculo then 
            local x, y, z = getElementRotation (Vehiculo) 
            setElementRotation (Vehiculo, 0, 0, (x > 90 and x < 270) and (z + 180) or z) 
      playSoundFrontEnd ( thePlayer, 101 ) 
      outputChatBox("#0080FFVehiculo volteado!",thePlayer, 0,128,255, true) 
     else 
   outputChatBox("#0080FFNo tienes un vehiculo para voltearlo!",thePlayer, 0,128,255, true) 
     end 
end 
  
addEventHandler("onPlayerJoin",root,function() 
     bindKey(source,"3", "down", flip) 
end) 
  
function onStart() 
  for id, players in ipairs(getElementsByType("player")) do 
    bindKey(players ,"3", "down", flip) 
  end 
end 

WOW! gracias!! :D!

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...