Jump to content

Need Help.


Recommended Posts

hello i have a problem when i spawn is left as it is in Tabel Like this pic :

----------------------------------------

Server side :

  
local Table = { 
{1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288} 
} 
  
 function Show(player) 
    local x, y, z, lx, ly, lz = unpack(Table[math.random(#Table)]) 
    fadeCamera(player, true, 5) 
    setTimer(setCameraMatrix, 1000, 1, player, x, y, z, lx, ly, lz) 
    setTimer(fadeCamera, 1000, 1, player, true) 
end 
addEventHandler("onPlayerWasted", root, function() Show(source) end) 
  

Edited by Guest
Link to comment

If I'm right, he's talking about the camera, he want's it to be watching the hospital, not the side of it.

@sckatchof: Just move the camera positions.

This position is the one I've used on one of my scripts:

local Table = 
{ 
    {1214.7238769531, -1323.6098632813, 31.14349937439, 1213.8430175781, -1323.6158447266, 30.670255661011, 0, 70} 
} 
  
function Show(player) 
    fadeCamera(player, true, 5) 
    setTimer(setCameraMatrix, 1000, 1, player, unpack(Table[math.random(#Table)])) 
    setTimer(fadeCamera, 1000, 1, player, true) 
end 
addEventHandler("onPlayerWasted", root, function() Show(source) end) 

Link to comment
  
local uTimers = { }  
local tPos =  
{ 
    { 1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288 } 
} 
  
function fShow( uPlayer ) 
    local x, y, z, lx, ly, lz = unpack( tPos [ math.random( #tPos ) ] ) 
    fadeCamera( uPlayer, true, 5 ) 
    toggleAllControls( uPlayer,false ) 
    setCameraMatrix( uPlayer, x, y, z, lx, ly, lz ) 
    uTimers[ uPlayer ] = setTimer( 
        function( uPlayer ) 
            setCameraTarget( uPlayer, uPlayer ) 
            fadeCamera( uPlayer, true ) 
            toggleAllControls( uPlayer, true ) 
        end, 
    1000, -- Change this if you want. 
    1, uPlayer )     
end 
  
addEventHandler( 'onPlayerQuit', root,  
    function( )  
        uTimers[ source ] = nil 
    end 
)    
  
addEventHandler( 'onPlayerWasted', root,  
    function( )  
        fShow( source ) 
    end 
) 

Updated.

Edited by Guest
Link to comment
local Table =  
{ 
    {1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288} 
} 
  
function Show(player) 
    local x, y, z, lx, ly, lz = unpack(Table[math.random(#Table)]) 
    fadeCamera(player, false, 5) 
    setTimer(setCameraMatrix, 1000, 1, player, x, y, z, lx, ly, lz) 
    setTimer(fadeCamera, 1000, 1, player, true) 
    setTimer(setCameraTarget, 3000, 1, player) 
end 
addEventHandler("onPlayerWasted", root, function() Show(source) end) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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