Jump to content

Right Click target ped ID


weedsawq

Recommended Posts

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

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