Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createTeamWindow()
- local sWidth, sHeight = guiGetScreenSize()
- local Width, Height = 231,188
- local X = (sWidth/2) - (Width/2)
- local Y = (sHeight/2) - (Height/2)
- showCursor(true)
- teamWindow = guiCreateWindow(X,Y,Width,Height,'Class Menu', false)
- guiWindowSetSizable(teamWindow,false)
- teamLabel = guiCreateLabel(18,23,191,33,'Click a buttom to select the team', false, teamWindow)
- guiLabelSetHorizontalAlign(teamLabel,'center',true)
- teamButtonCrips = guiCreateButton(18,63,195,35,'Crips',false, teamWindow)
- teamButtonBloods = guiCreateButton(18,103,195,35,'Bloods', false, teamWindow)
- end
- addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
- function ()
- -- call the createTeleportWindow function to create our gui
- createTeamWindow()
- end
- )
- addEventHandler('onClientGUIClick', teamButtonCrips, movePlayer, false)
- addEventHandler('onClientGUIClick', teamButtonBloods, movePlayer, false)
- function movePlayer(button,state)
- if buttom == 'left' and state == 'up' then
- if source == teamButtonCrips then
- triggerServerEvent(movePlayer, getLocalPlayer(), 2642.4440917969, -2004.3111572266, 13.5546875, 0, 106, 0, 0)
- outputChatBox('If you Crip throw it up!')
- elseif source == spawnButtonBloods then
- triggerServerEvent(movePlayer, getLocalPlayer(), 2350.5021972656, -1913.4753417969, 13.551965713501, 0, 107, 0, 0)
- outputChatBox('If you Blood throw it up!')
- end
- guiSetVisible(teamWindow,false)
- showCursor(false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment