Jump to content

مشكله في سكربت


Recommended Posts

attempt to call  global "addEventHandler" line 6 ( nil value )

function marker ()
marker1 = createMarker(2485.00000, -1667.00000, 12.34375,"cylinder",3,210, 105, 30)
end
addEventHandler("onClientResourceStart", getRootElement(), marker)

addEventhandler("onClientMarkerHit", marker1, 
function (hitElement)
    if ( source == marker1 ) and ( getElementType(hitElement) == "player" ) and ( getElementData(hitElement, 'Group') == 'Terrorists' ) then
      window = guiCreateWindow(467, 213, 475, 179, "Terrorists Job", false)
        guiWindowSetSizable(window, false)

        accept = guiCreateButton(9, 126, 139, 43, "Accept", false, window)
        close1 = guiCreateButton(321, 126, 139, 43, "Close", false, window)
		guiSetVisible(window,false)
        
      showCursor(true)
      outputChatBox("Welcome Terrorist", 255, 255, 255, true)
      end
	  end)

 

Link to comment
Spoiler

local marker1 = createMarker(2485.00000, -1667.00000, 12.34375,"cylinder",3,210, 105, 30)



function M(hitElement)
    if ( source == marker1 ) and ( getElementType(hitElement) == "player" ) and ( getElementData(hitElement, 'Group') == 'Terrorists' ) then
      window = guiCreateWindow(467, 213, 475, 179, "Terrorists Job", false)
        guiWindowSetSizable(window, false)

        accept = guiCreateButton(9, 126, 139, 43, "Accept", false, window)
        close1 = guiCreateButton(321, 126, 139, 43, "Close", false, window)
		guiSetVisible(window,false)
        
      showCursor(true)
      outputChatBox("Welcome Terrorist", 255, 255, 255, true)
      end
	  end
addEventHandler ( "onClientMarkerHit", getRootElement(), M )

 

 

Link to comment
4 minutes ago, #STZ said:
  Hide contents


local marker1 = createMarker(2485.00000, -1667.00000, 12.34375,"cylinder",3,210, 105, 30)



function M(hitElement)
    if ( source == marker1 ) and ( getElementType(hitElement) == "player" ) and ( getElementData(hitElement, 'Group') == 'Terrorists' ) then
      window = guiCreateWindow(467, 213, 475, 179, "Terrorists Job", false)
        guiWindowSetSizable(window, false)

        accept = guiCreateButton(9, 126, 139, 43, "Accept", false, window)
        close1 = guiCreateButton(321, 126, 139, 43, "Close", false, window)
		guiSetVisible(window,false)
        
      showCursor(true)
      outputChatBox("Welcome Terrorist", 255, 255, 255, true)
      end
	  end
addEventHandler ( "onClientMarkerHit", getRootElement(), M )

 

 

شكرا

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...