Jump to content

Matrix


Ballasbuster

Recommended Posts

Hi Dudes, I did a script on camera from the matrix at the entrance to the server. But I do not know how to do this disappeared after logging. Please help fast.

function setCameraOnPlayerJoin() 
     fadeCamera(source, true, 2) 
     setCameraMatrix(source, 363.19458007813, -1989.0324707031, 21.265274047852, 31.334917297363, 0, 197) 
     end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

Sorry my bad English

Link to comment
  • Discord Moderators

by logging you mean logging in?

something like this:

function setCameraOnPlayerJoin() 
     fadeCamera(source, true, 2) 
     setCameraMatrix(source, 363.19458007813, -1989.0324707031, 21.265274047852, 31.334917297363, 0, 197) 
     addEventHandler ('onPlayerLogin', source, function() setCameraTarget (source, source) end) 
     end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

Link to comment
  • Discord Moderators

do you mean the hud, radar and chat being disabled for as long as the camera matrix is set?

  
local hudComponents = {'ammo', 'area_name', 'armour', 'breath', 'clock', 'health', 'money', 'radar', 'vehicle_name', 'weapon'} 
  
function setCameraOnPlayerJoin() 
    fadeCamera(source, true, 2) 
    setCameraMatrix(source, 363.19458007813, -1989.0324707031, 21.265274047852, 31.334917297363, 0, 197) 
    showChat (source, false) 
    for _, component in ipairs (hudComponents) do showPlayerHudComponent (source, component, false) end 
  
    addEventHandler ('onPlayerLogin', source, 
        function()  
            setCameraTarget (source, source);  
            for _, component in ipairs (hudComponents) do showPlayerHudComponent (source, component, true) end;  
            showChat (source, true) 
        end 
    ) 
  
    end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 
  

soz about the looks, written quickly inside post

edit: fixed

Link to comment
  
local black = tocolor(0,0,0,255) 
local screenWidth, screenHeight = guiGetScreenSize() 
local boxHeight = screenHeight/5 
  
function drawLetterBox() 
  dxDrawRectangle(0, 0, screenWidth, boxHeight, black) 
  dxDrawRectangle(0, screenHeight-boxHeight, screenWidth, boxHeight, black) 
end 
addEventHandler("onClientRender", getRootElement(), drawLetterBox) 
  

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...