Jump to content

weedsawq

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by weedsawq

  1. I will type "/ search" on the server and cameraTarget appears on the client but, taking the camera position on the server, i get "ipairs, table expected got nil" client.lua function engineobj ( message, sasr ) for k,v in ipairs ( objs,"sasr" ) do if k == objs then outputChatBox ( "#FF0000CAM: " ..message.."", 255 ,255 ,255, true) local px, py, pz = getElementPosition ( isElement(sasr)) setCameraTarget ( px, py, pz[k]) outputConsole ( "CAMC: " ..px.. " " ..py.. " " ..pz ) end end if not ( (k) "sasr" ) then outputChatBox ( "#FF0000*Not Object available*", getRootElement(), 255, 255, 255, true ) end end addEvent( "onSearch", true ) addEventHandler( "onSearch", resourceRoot, engineobj )
  2. I want to make the script by clicking the button, the window will close, and this script click the window will close, please repair it. menu = createMarker(-2385.5, -748.7, 133.1, "cylinder", 3, 255, 0, 0) function openShop( hitElement, matchingDimension) triggerClientEvent( "onGreeting", resourceRoot, "Your HIT.", client ) end addEventHandler("onMarkerHit",menu, openShop) ^server side function onHitGreet ( message, button ) outputChatBox ( "SHOP: "..message ) shopmenu = guiCreateWindow ( 100, 200, 300, 300,"panel", false ) buttonX = guiCreateButton ( 100, 200, 25, 25,"X", false, shopmenu ) local function click( button ) outputChatBox ( "SHOP: you're close" ) guiSetVisible( shopmenu, not guiGetVisible( shopmenu )) end addEventHandler ( "onClientGUIClick", buttonX, click, true ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", resourceRoot, onHitGreet ) ^client side
  3. 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
  4. How can the client work? I do not know the client is working or not. Can you give OutputChatBox Also? To know the client is working.
  5. I tried it to click the object but when I click the ped or vehicle why can also?
×
×
  • Create New...