Jump to content

Unas dudas


Carlossg

Recommended Posts

addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        local randomPlayer = getRandomPlayer ( ) 
        local x, y, z, lx, ly, lz, wex, wey = getCameraMatrix( randomPlayer ) 
        setCameraMatrix ( source, x, y, z, lx, ly, lz, wex, wey ) 
    end 
) 

WARNING: [gameplay]\Camera\camera.lua:5: Bad argument @ 'setCameraMatrix'

Link to comment
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        local randomPlayer = getRandomPlayer ( ) 
        local x, y, z = getElementPosition( randomPlayer ) 
        if randomPlayer == source then 
        outputChatBox ( "Sorry", source) 
        else 
        outputChatBox ( "Good job") 
        end 
        setCameraMatrix ( source, x, y, z) 
    end 
) 

He visto que con el GetCameraMatrix, no funciona sin haberlo puesto antes y he usado getElemenPosition, pero no funciona.

Link to comment

Che y no probastes con

setCameraTarget

https://wiki.multitheftauto.com/wiki/SetCameraTarget

Fijate si esto anda

addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        local randomPlayer = getRandomPlayer ( ) 
        if randomPlayer == source then 
        outputChatBox ( "Sorry", source) 
        else 
        outputChatBox ( "Good job") 
        end 
        setCameraTarget( source,randomPlayer) 
    end 
) 

Link to comment
  • Recently Browsing   0 members

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