Jump to content

SpriN'

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by SpriN'

  1. (account) وهل توجد طريقة لجعلها تبحث بحساب اللاعب ?
  2. I got the same problem.
  3. The gui doesn't appear when I use it like that: Client-side local marker = createMarker( 1282, -1664.5999755859, 12.5, "Cylinder", 2, 255, 255, 255, 255, 100, getRootElement()) function swatjob(hitElement) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} if getElementType( hitElement ) == "player" and hitElement == getLocalPlayer() then if ( guiGetVisible (windowjob) == true ) then guiSetVisible (windowjob, false ) else guiSetVisible (windowjob, false ) windowjob = guiCreateWindow(1031,232,301,397,"SWAT job",false) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,windowjob) addEventHandler("onClientGUIClick", GUIEditor_Button[2], closeWindow, false) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,215,"To take SWAT team job, press Take job.\n\nIf you don't want to, press Cancel.\n\n\nNOTE: You need to be into SWAT team group.",false,windowjob) addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeswatWindow, false) addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) showCursor(true) end end end function joinTeam() triggerServerEvent("setSWAT",localPlayer) end function removeswatWindow() guiSetVisible(windowjob, false) showCursor(false) end Server-Side function createSWATTeam () SWATTeam = createTeam ("SWAT Team", 0, 0, 255) end addEventHandler ("onResourceStart", resourceRoot, createSWATTeam) function joinSWAT() setPlayerTeam(source,SWATTeam) setElementModel(source,285) end addEvent("setSWAT", true) addEventHandler("setSWAT",root,joinSWAT) and it's appear when I use it like that: local marker = createMarker( 1282, -1664.5999755859, 12.5, "Cylinder", 2, 255, 255, 255, 255, 100, getRootElement()) function swatjob(hitElement) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} if getElementType( hitElement ) == "player" and hitElement == getLocalPlayer() then if ( guiGetVisible (windowjob) == true ) then guiSetVisible (windowjob, false ) else guiSetVisible (windowjob, false ) windowjob = guiCreateWindow(1031,232,301,397,"SWAT job",false) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,windowjob) addEventHandler("onClientGUIClick", GUIEditor_Button[2], closeWindow, false) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,215,"To take SWAT team job, press Take job.\n\nIf you don't want to, press Cancel.\n\n\nNOTE: You need to be into SWAT team group.",false,windowjob) addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeswatWindow, false) addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) showCursor(true) end end end function joinTeam (source) local SWATTeam = getTeamFromName ("SWAT Team") if (SWATTeam) then outputChatBox ( "You are now SWAT.",source, 0, 255, 0 ) setPlayerTeam (source, SWATTeam) end end addEventHandler("onClientMarkerHit", marker, swatjob) function removeswatWindow() guiSetVisible(windowjob, false) showCursor(false) end but the Take job button doesn't work
  4. Well, I got another little problem with the GUIEditor_Button[1], I just want to make it when you click at it you change to SWAT Team and your skin change to SWAT skin.. I tried to add this but doesn't work addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function joinTeam (source) local SWATTeam = getTeamFromName ("SWAT Team") if (SWATTeam) then setPlayerTeam (source, "SWAT Team" ) setElementModel (thePlayer, 217) end end end
  5. Resolved, thanks for the help.
  6. I want to make a marker for SWAT job, but I got problem, here's my script local marker = createMarker (1282, -1664.5999755859, 12.5, "cylinder", 2, 255, 255, 255, 255) function createSWATTeam () SWATTeam = createTeam ("SWAT Team", 0, 0, 255) end addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()), createSWATTeam) function GUIEditor_Window() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(1031,232,301,397,"SWAT job",false) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,215,"To take SWAT team job, press Take job.\n\nIf you don't want to, press Cancel.\n\n\nNOTE: You need to be into SWAT team group.",false,GUIEditor_Window[1]) end -- show GUI -- function showWindow () getVisible = guiGetVisible (GUIEditor_Window[1]) playerName = getPlayerName ( getLocalPlayer() ) if (getVisible == true) then guiSetVisible (GUIEditor_Window[1], false) showCursor (false) end if (getVisible == false) then guiSetVisible (GUIEditor_Window[1], true) showCursor (true) end end addEventHandler ("onMarkerHit", marker, showWindow) -- Remove GUI -- function closeWindow () if guiGetVisible(GUIEditor_Window[1]) == false then guiSetVisible(GUIEditor_Window[1], true) end end addEventHandler("onClientGUIClick", cancelButton, closeWindow) and this is the problem:
×
×
  • Create New...