weedsawq Posted August 28, 2017 Posted August 28, 2017 How to make right click target id open createwindow open? Client.lua function click ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if getElementType( clickedElement ) == "ped" then outputChatBox("window") local myWindow = guiCreateWindow ( 0.1, 0.1, 0.8, 0.7, "Furniture SHOP", true ) -- create a window which has "Information" in the title bar. local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) -- create a tab panel which fills the whole window local tabMap = guiCreateTab( "Furniture", tabPanel ) -- create a tab named "Map Information" on 'tabPanel' local tabHelp = guiCreateTab( "Tool", tabPanel ) -- create another tab named "Help" on 'tabPanel' -- adds a label (text) to each tab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Do not sell.", true, tabMap) guiCreateLabel(0.02, 0.04, 0.94, 0.92, "Do not sell.", true, tabHelp) end end addEventHandler ( "onClientClick", root, click) Server.lua function attachTest(player) x,y,z = getElementPosition(player) ped1 = createPed(23, x, y, z) end addCommandHandler ( "bit", attachTest ) Help: Please let me know
Moderators IIYAMA Posted August 28, 2017 Moderators Posted August 28, 2017 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now