Advertisement
Noneatme

Untitled

Sep 6th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.11 KB | None | 0 0
  1. local JobMarker = createMarker( -2152.7998046875, 225.36972045898, 34.299999237061, "cylinder")
  2.  
  3. local function createWindow()
  4.         local gui = {}
  5.         local X, Y, Width, Height = getMiddleGuiPosition(170,97)
  6.         gui['ROOT'] = guiCreateWindow(X, Y, Width, Height, "HotDogStand",false)
  7.         gui['KAUFEN'] = guiCreateButton(21,45,79,30,"Kaufen (7$)",false,gui['ROOT'])
  8.         gui['CLOSE']  = guiCreateButton(116,47,29,26,"X",false,gui['ROOT'])
  9.         showCursor( true )
  10.         guiSetVisible( gui['ROOT'], true)
  11.         addEventHandler("onClientGUIClick", gui['ROOT'], function()
  12.             destroyElement(gui['ROOT'])
  13.             showCursor(false)
  14.         end, false)
  15. end
  16.  
  17. addEventHandler('onClientMarkerHit', JobMarker,
  18.         function(hElemt, dim)
  19.               if(hElement ~= localPlayer) then
  20.                     createWindow()
  21.              end
  22.         end
  23. );
  24.  
  25. fileDelete( 'client.lua' )
  26.  
  27. function getMiddleGuiPosition(lol, lol2)
  28.  
  29.     local sWidth, sHeight = guiGetScreenSize()
  30.  
  31.     local Width,Height = lol, lol2
  32.     local X = (sWidth/2) - (Width/2)
  33.     local Y = (sHeight/2) - (Height/2)
  34.    
  35.     return X, Y, Width, Height
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement