Jump to content

fadeCamera problem


TheIceman1

Recommended Posts

Its when i turn on fadeCamera:

function setCameraOnPlayerJoin() 
    fadeCamera( source, true ) 
    setCameraMatrix( source, 1468.8785400391, -919.25317382813, 100.153465271, 1527.7, -1685.8, 99.881813049316 ) 
end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

Its when i need turn off FadeCamera:

function spawnsf() 
setElementPosition ( source, 0, 0, 1 ) 
fadeCamera( source, false )  
end 
addEvent("spawnsf",true) 
addEventHandler("spawnsf", root, spawnsf) 

Link to comment
don't sure but try:
function spawnsf() 
setElementPosition ( source, 0, 0, 1 ) 
fadeCamera( source, true ) 
end 
addEvent("spawnsf",true) 
addEventHandler("spawnsf", root, spawnsf) 

Nothing,but in console it says:Loginsystem/server.lua:29:Access denied @ "addAccount"

Loginsystem/server.lua:30:Bad argument @ "logIn"[Expected account at argument 2, got nil]

function registerHandler(username, password) 
    local account = getAccount(username, password) 
    if (account ~= false) then 
    else 
        account = addAccount(username, password) 
        if (logIn(source, account, password) == true) then 
            triggerClientEvent(source, "hideRegisterWindow", getRootElement()) 
        end 
    end 
end 
addEventHandler("submitRegister", root, registerHandler) 

Link to comment
Nothing,but in console it says:Loginsystem/server.lua:29:Access denied @ "addAccount"

Loginsystem/server.lua:30:Bad argument @ "logIn"[Expected account at argument 2, got nil]

function registerHandler(username, password) 
    local account = getAccount(username, password) 
    if (account ~= false) then 
    else 
        account = addAccount(username, password) 
        if (logIn(source, account, password) == true) then 
            triggerClientEvent(source, "hideRegisterWindow", getRootElement()) 
        end 
    end 
end 
addEventHandler("submitRegister", root, registerHandler) 

Its fixed.

Its problem,fade camera isnt removed.

function spawnsf() 
setElementPosition ( source, 0, 0, 1 ) 
fadeCamera( source, true ) 
end 
addEvent("spawnsf",true) 
addEventHandler("spawnsf", root, spawnsf) 

Link to comment
function setCameraOnPlayerJoin() 
    fadeCamera( source, false ) 
    setCameraMatrix( source, 1468.8785400391, -919.25317382813, 100.153465271, 1527.7, -1685.8, 99.881813049316 ) 
end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

function spawnsf() 
setElementPosition ( source, 0, 0, 1 ) 
fadeCamera( source, true )  
end 
addEvent("spawnsf",true) 
addEventHandler("spawnsf", root, spawnsf) 

Link to comment
function setCameraOnPlayerJoin() 
    fadeCamera( source, false ) 
    setCameraMatrix( source, 1468.8785400391, -919.25317382813, 100.153465271, 1527.7, -1685.8, 99.881813049316 ) 
end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

function spawnsf() 
setElementPosition ( source, 0, 0, 1 ) 
fadeCamera( source, true )  
end 
addEvent("spawnsf",true) 
addEventHandler("spawnsf", root, spawnsf) 

Fixed.

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