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