Jump to content

Blackscreen problem


franku

Recommended Posts

Whenever i want to join a team, a blackscreen pops up and remains, it sometimes doesn't pop up and everything looks fine!, but my friend just can't join because of the blackscreen.

if i joined successfully without blackscreen he won't be able to, vice versa.

i use removeEventHandler,

code

local xz,yz = guiGetScreenSize() 
  
function fsdll() 
local showIt = true 
    if (showIt) then 
        showChat(true) 
        dxDrawImage(0, 0, xz, yz, "background.png") 
    end 
end 
addEventHandler( "onClientRender", root, fsdll ) 
  
  
addCommandHandler( "ballas", function () 
    for _, player in ipairs(getElementsByType("player")) do 
        removeEventHandler( "onClientRender", root, fsdll ) 
    end 
end) 
  
addCommandHandler( "grove", function () 
    for _, player in ipairs(getElementsByType("player")) do 
        removeEventHandler( "onClientRender", root, fsdll ) 
    end 
end) 

blackscreen

Gp2UXss.png

Link to comment

The code doesn't make sense. You're drawing an image with the size of the screen, so that might be the reason why it's black. Another cause might be that you don't use fadeCamera when the player joins/spawns.

Also, why are you removing the event handler for each player element in the server? This won't remove it for each player, this will just remove it several times for the same client.

If you couldn't resolve it still, post your spawn code.

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