-
Notifications
You must be signed in to change notification settings - Fork 4
Example
Linus edited this page Jul 29, 2018
·
15 revisions
A simple panel you can open and close with a chat command.
@persist Frame:dframe
if(first()) {
runOnChat(1)
#add all players to the default list
vguiDefaultPlayers(players())
#create the frame
Frame = dframe(1)
Frame:setSize(150,150)
Frame:center()
Frame:setVisible(0) #set it invisible on create
Frame:create()
}
if(chatClk()) {
if(lastSaid()=="menu") {
local Visible = Frame:isVisible(lastSpoke()) #get the current visible status for the player
Frame:setVisible(!Visible) #inverse the status
Frame:modify(array(lastSpoke())) #apply changes only to the player who executed the command
}
}