Jump to content

[ERRO]Server trigger erro


Recommended Posts

CLIENT-SIDE 

function Abrir_Flecca ( )
    if PainelDX == false then
        showCursor ( true )
        playSoundFrontEnd ( 43 )
        PainelDX = true
        addEventHandler ( "onClientRender", getRootElement(), Painel_DX )
    end
end
addEvent ( "AbrirFleeca", true)
addEventHandler ( "AbrirFleeca", root, Abrir_Flecca )

function Fechar_Flecca ( )
    if PainelDX == true then
        showCursor ( false )
        playSoundFrontEnd ( 40 )
        PainelDX = false
        removeEventHandler ( "onClientRender", getRootElement(), Painel_DX )
    end
end
addEvent ( "FecharFleeca", true)
addEventHandler ( "FecharFleeca", root, Fechar_Flecca )

SERVER-SIDE

function Abrir_Painel ( marker, md )
  if md then
    if not isPedInVehicle ( source ) then
      if marker == Painel_Marker then
          triggerClientEvent ( source, "AbrirFleeca", root )
      end
    end
  end
end
addEventHandler ( "onPlayerMarkerHit", getRootElement(), Abrir_Painel )

function Fechar_Painel ( marker, md )
  if md then
      if marker == Painel_Marker then
        triggerClientEvent ( source, "FecharFleeca", root )
    end
    end
end
addEventHandler ( "onPlayerMarkerLeave", getRootElement(), Fechar_Painel )

FOTO DO ERRO:https://prnt.sc/mv1he0 

Link to comment
CLIENT-SIDE 

function Abrir_Flecca ( )
    if PainelDX == false then
        showCursor ( true )
        playSoundFrontEnd ( 43 )
        PainelDX = true
        addEventHandler ( "onClientRender", getRootElement(), Painel_DX )
    end
end
addEvent ( "AbrirFleeca", true)
addEventHandler ( "AbrirFleeca", root, Abrir_Flecca )

function Fechar_Flecca ( )
    if PainelDX == true then
        showCursor ( false )
        playSoundFrontEnd ( 40 )
        PainelDX = false
        removeEventHandler ( "onClientRender", getRootElement(), Painel_DX )
    end
end
addEvent ( "FecharFleeca", true)
addEventHandler ( "FecharFleeca", root, Fechar_Flecca )

SERVER-SIDE

function Abrir_Painel ( marker, md )
  if md then
    if not isPedInVehicle ( source ) then
      if marker == Painel_Marker then
          triggerClientEvent ( source, "AbrirFleeca", root )
      end
    end
  end
end
addEventHandler ( "onPlayerMarkerHit", getRootElement(), Abrir_Painel )

function Fechar_Painel ( marker, md )
  if md then
      if marker == Painel_Marker then
        triggerClientEvent ( source, "FecharFleeca", root )
    end
    end
end
addEventHandler ( "onPlayerMarkerLeave", getRootElement(), Fechar_Painel )

 

Link to comment
14 minutes ago, rOckzinhoMTA said:

CLIENT-SIDE 

function Abrir_Flecca ( )
    if PainelDX == false then
        showCursor ( true )
        playSoundFrontEnd ( 43 )
        PainelDX = true
        addEventHandler ( "onClientRender", getRootElement(), Painel_DX )
    end
end
addEvent ( "AbrirFleeca", true)
addEventHandler ( "AbrirFleeca", root, Abrir_Flecca )

function Fechar_Flecca ( )
    if PainelDX == true then
        showCursor ( false )
        playSoundFrontEnd ( 40 )
        PainelDX = false
        removeEventHandler ( "onClientRender", getRootElement(), Painel_DX )
    end
end
addEvent ( "FecharFleeca", true)
addEventHandler ( "FecharFleeca", root, Fechar_Flecca )

SERVER-SIDE

function Abrir_Painel ( marker, md )
  if md then
    if not isPedInVehicle ( source ) then
      if marker == Painel_Marker then
          triggerClientEvent ( source, "AbrirFleeca", root )
      end
    end
  end
end
addEventHandler ( "onPlayerMarkerHit", getRootElement(), Abrir_Painel )

function Fechar_Painel ( marker, md )
  if md then
      if marker == Painel_Marker then
        triggerClientEvent ( source, "FecharFleeca", root )
    end
    end
end
addEventHandler ( "onPlayerMarkerLeave", getRootElement(), Fechar_Painel )

 

Talvez esse tópico te ajude: 

 

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