Jump to content

[Ayuda]Panel Vip[Duda]


Recommended Posts

Primero te explico seas nuevo aca -_- solo ayudo:

Mira debes publicar parte de tu script que deseas modificar o crear porque sin codigo no te ayudaran -_-

Nombre del codigo etc end 

No se si te ayude pero aca hay un script que te sirva tienes que ponerlo en tu archivo cliente:

  
function panelvip(hitElement) 
guiSetVisible( nombredelpanel , true)------en "nombredelpanel " pones el respectivo nombre de el panel que deseas abrir 
showCursor(true) 
end 
addCommandHandler("panelvip",panelvip) 
  

Link to comment

pero para cerrar lo como?

___________________________

solo lo puedo abrir

  
function onResStart () 
    for index, player in ipairs ( getElementsByType ( "player" ) ) do 
    bindKey ( player, "F3", "down", Lalavip ) 
end 
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), onResStart) 
  
function onPlayerJoin () 
    bindKey ( source, "F3", "down", Lalavip ) 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerJoin) 
  
function cleanAll (player) 
    for index, player in ipairs ( getElementsByType ( "player" ) ) do 
    unbindKey ( player, "F3", "down", Lalavip ) 
end 
end 
addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource() ), cleanAll) 

Edited by Guest
Link to comment
--Define esto global-mente 
local isOpen = false 
  
--Reemplaza esto en todos los bindKey  
bindKey ( player, "F3", "down", main ) 
  
--Tambien el unbind 
unbindKey ( player, "F3", "down", main ) 
  
--Agrega esta funcion a tu codigo 
function main() 
    if isOpen then 
        isOpen = false 
        --Inserta una funcion para cerrar tu panel 
    else 
        Lalavip() 
        isOpen = true 
    end 
end 
  

Link to comment
pero para cerrar lo como?

___________________________

solo lo puedo abrir

  
function onResStart () 
    for index, player in ipairs ( getElementsByType ( "player" ) ) do 
    bindKey ( player, "F3", "down", Lalavip ) 
end 
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), onResStart) 
  
function onPlayerJoin () 
    bindKey ( source, "F3", "down", Lalavip ) 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerJoin) 
  
function cleanAll (player) 
    for index, player in ipairs ( getElementsByType ( "player" ) ) do 
    unbindKey ( player, "F3", "down", Lalavip ) 
end 
end 
addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource() ), cleanAll) 

borra

guiSetVisible( nombredelpanel , true) 

y colocas esto:

guiSetVisible( nombredelpanel, not guiGetVisible(nombredelpanel)) 

Link to comment
  • Recently Browsing   0 members

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