Jump to content

SkullBreaker

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by SkullBreaker

  1. It now shows this error: Error: Bad argument @ serverside line 8 and 16. [Expected element at argument 2, got nill] What to do about this?
  2. A gui to create a marker if you press a button
  3. Hi, I made a gui for a event, if you press the button "Start!" 2 markers will be created. But it shows a error about "Need a element at argument 2, got nill ( line 13 and 27 ) " So I don't know how to fix this. THis is my client: local EvMarker = createMarker ( 1547.88953, -1681.53955, 12.5, 'arrow', 2, 255, 0, 0, 255 ) function createEvGui () GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} EvGui = guiCreateWindow(333,326,185,220,"SARG Event panel 0.1",false) EvTabPan = guiCreateTabPanel(10,20,166,191,false,GUIEditor_Window[1]) EvTab = guiCreateTab("Rules",EvTabPan) EvMemo = guiCreateMemo(6,4,155,182,"The rules of the event: There are 2 teams, armed with spray, the goal is to eliminate the enemy team with the spray, admins can stop the event by typing: /stop ()Events",false,GUIEditor_Tab[1]) guiMemoSetReadOnly(EvMemo,true) EvTab2 = guiCreateTab("START!",EvTabPanel) Start = guiCreateButton(23,33,129,64,"START EVENT",false,EvTab2) end addEventHandler("onClientMarkerHit", dutyMarker, function(hitElement) if hitElement == localPlayer then createEvGui ( hitElement ) if (EvGui ~= nil) then guiSetVisible(EvGui, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox ("The event is not ready yet.") end end end ) function Event(button,state) if (source == Start) then triggerServerEvent (StartKnop, true) end end addEventHandler("onClientGuiClick", root, Event) and server: function MarkerRed () evmarkerred = createMarker ( 1547.88953, -1683, 12.5, 'cylinder', 2, 255, 0, 0, 255 ) end addEvent("Event", true) addEventHandler("Event", root, MarkerRed) function setPosRed ( hitElement ) if getElementType ( hitElement ) == "player" and not isPedInVehicle ( hitElement ) then setElementPosition ( 2838.6000976563, -2527.6999511719, 19 ) giveWeapon ( source, 41, 100000 ) end end addEventHandler("onMarkerHit", evmarkerred, setPosRed) function MarkerBlue () evmarkerblue = createMarker ( 1547.88953, -1686, 12.5, 'cylinder', 2, 0, 0, 255, 255 ) end addEvent("Event", true) addEventHandler("Event", root, MarkerBlue) function setPosBlue ( hitElement ) if getElementType ( hitElement ) == "player" and not isPedInVehicle ( hitElement ) then setElementPosition ( 2837.6999511719, -2333, 12 ) giveWeapon ( source, 41, 100000 ) end end addEventHandler("onMarkerHit", evmarkerblue, setPosBlue) thanks.
  4. The button ; GUIEditor_Button[1] = guiCreateButton(23,33,129,64,"START EVENT",false,GUIEditor_Tab[2]) must work if i click the button there must appair a marker who teleports you to a other location, and start a other recource/gamemode like ctf or somthing
  5. Hi All, i want to script a event gui i have this as client script: function() GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Window[1] = guiCreateWindow(333,326,185,220,"SARG Event panel 0.1",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(10,20,166,191,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Memo[1] = guiCreateMemo(6,4,155,182,"The rules of the event: There are 2 teams, armed with spray, the goal is to eliminate the enemy team with the spray, admins can stop the event by typing: /stop ()Events",false,GUIEditor_Tab[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Tab[2] = guiCreateTab("START!",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(23,33,129,64,"START EVENT",false,GUIEditor_Tab[2]) end end addEventHandler("onClientResourceStart",resourceRoot, What to do now? pls help me i am a beginner
  6. Hi all, i am a beginner so my script doesn't work i want to open (and close) a gate on a team onMarkerHit so this is what i got: local ingang1 = createObject ( 980, 1602.099609375, -1613.099609375, 15.300000190735, 0, 0, 0 ) local ingangmarker = createMarker(-1907.9000244141, 1613.1999511719, 13.5, "cylinder", 5, 0, 0, 0, 0) local teams = {["Police"] = true} function moveGate1 ( hitElement, matchingDimension ) if getElementType ( hitElement ) == "player" and getPlayerTeam ( hitElement ) and teams[getTeamName(getPlayerTeam ( hitElement ))] then moveObject ( ingang1, 3000, 1602.099609375, -1613.1999511719, 15.300000190735 ) end end addEventHandler("onMarkerHit", ingangmarker, moveGate1) function moveGate1Back ( leaveElement, matchingDimension ) if getElementType ( leaveElement ) =="player" and getPlayerTeam ( leaveElement ) and teams [getTeamName(getPlayerTeam ( leaveElement ))] then MoveObject (ingang1, 3000, 1602.099609375, -1613.099609375, 15.300000190735 ) end end addEventHandler ("onMarkerLeave", ingangmarker, moveGate1Back) Pls help me!!!
×
×
  • Create New...