Guest User

Untitled

a guest
Sep 4th, 2010
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.46 KB | None | 0 0
  1. function createTeamWindow()
  2. local sWidth, sHeight = guiGetScreenSize()
  3. local Width, Height = 231,188
  4. local X = (sWidth/2) - (Width/2)
  5. local Y = (sHeight/2) - (Height/2)
  6. showCursor(true)
  7. teamWindow = guiCreateWindow(X,Y,Width,Height,'Class Menu', false)
  8. guiWindowSetSizable(teamWindow,false)
  9. teamLabel = guiCreateLabel(18,23,191,33,'Click a buttom to select the team', false, teamWindow)
  10. guiLabelSetHorizontalAlign(teamLabel,'center',true)
  11. teamButtonCrips = guiCreateButton(18,63,195,35,'Crips',false, teamWindow)
  12. teamButtonBloods = guiCreateButton(18,103,195,35,'Bloods', false, teamWindow)
  13. end
  14.  
  15.  
  16. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
  17.     function ()
  18.         -- call the createTeleportWindow function to create our gui
  19.         createTeamWindow()
  20.     end
  21. )
  22.  
  23. addEventHandler('onClientGUIClick', teamButtonCrips, movePlayer, false)
  24. addEventHandler('onClientGUIClick', teamButtonBloods, movePlayer, false)
  25.  
  26. function movePlayer(button,state)
  27. if buttom == 'left' and state == 'up' then
  28. if source == teamButtonCrips then
  29. triggerServerEvent(movePlayer, getLocalPlayer(), 2642.4440917969, -2004.3111572266, 13.5546875, 0, 106, 0, 0)
  30. outputChatBox('If you Crip throw it up!')
  31. elseif source == spawnButtonBloods then
  32. triggerServerEvent(movePlayer, getLocalPlayer(), 2350.5021972656, -1913.4753417969, 13.551965713501, 0, 107, 0, 0)
  33. outputChatBox('If you Blood throw it up!')
  34. end
  35. guiSetVisible(teamWindow,false)
  36. showCursor(false)
  37. end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment