Jump to content

Ayuda - Attach


Matty

Recommended Posts

Buenas, Necesito de su ayuda; que funciones y eventos tengo que usar para atachar los objetos al vehiculo como se muestra en esta imagen:

helitable.png

A mi criterio creería que estas:

getElementModel 
getElementPosition 
attachElements 
createObject 
"onResourceStart" 

Ustedes que dicen :roll: ??

Link to comment

Cual es el error :S?

Code:

function HeliTable(theVehicle, seat, jacked) 
local id = getElementModel (theVehicle) 
if id == 487 or id == 497 then 
  table1 = createObject (1698, 0, 0, 0) 
  table2 = createObject (1698, 0, 0, 0) 
----------------------------------------------------- 
     attachElements(table1, theVehicle, 1.5, 1, -1) 
     attachElements(table2, theVehicle, -1.5, 1, -1) 
----------------------------------------------------- 
     outputChatBox ( "#00FF00Paneles Creados.", getRootElement(), 255, 255, 255, true ) 
  else 
     outputChatBox ( "#FF0000No funco!.", getRootElement(), 255, 255, 255, true ) 
  end 
end 
addCommandHandler("paneles", HeliTable) 

Link to comment
function HeliTable ( thePlayer ) 
    local theVehicle = getPedOccupiedVehicle ( thePlayer ) 
    if ( theVehicle ) then 
        local id = getElementModel ( theVehicle ) 
        if ( id == 487 or id == 497 ) then 
            table1 = createObject ( 1698, 0, 0, 0 ) 
            table2 = createObject ( 1698, 0, 0, 0 ) 
            ----------------------------------------------------- 
            attachElements ( table1, theVehicle, 1.5, 1, -1 ) 
            attachElements ( table2, theVehicle, -1.5, 1, -1 ) 
            ----------------------------------------------------- 
            outputChatBox ( "#00FF00Paneles Creados.", getRootElement(), 255, 255, 255, true ) 
        else 
            outputChatBox ( "#FF0000No funco!.", getRootElement(), 255, 255, 255, true ) 
        end 
    end 
end 
addCommandHandler ( "paneles", HeliTable ) 

Link to comment
  • Recently Browsing   0 members

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