Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. well i had tried and with source with is server side didnt work i want server side
  2. local barrier = createObject(968, -1572.19, 658.79, 6.8, 0, 270, 270) state = 0 function openb(player) if state == 0 and getElementPosition(player, -1562.9, 661.9, 7) or getElementPosition(player, -1579.3, 661, 7.1)then setElementRotation(barrier, 0, 0, 270) state = 1 outputChatBox("opens the barrier.", getPlayerName(player), player, 0, 255, 255) else if state == 1 and getElementPosition(player, -1562.9, 661.9, 7) or getElementPosition(player, -1579.3, 661, 7.1) then setElementRotation(barrier, 0, 270, 270) state = 0 outputChatBox("closes the barrier.", getPlayerName(player), player, 0, 255, 255) end end end addCommandHandler("gate",openb) getElementPossition a nill value getLocalPlayer a nil lvalue
  3. I want learn where to put the getelementposition so opens where is in that locations
  4. Hello i have a problem i try move a object roty and no go there i want i have for 0 and go 90 i put 270 and he go 180 also change and z for 270 to 0 please help <meta> <script src="sfb.lua"/> </meta> local barrier = createObject(968, -1572.1, 658.7, 6.8, 0, 270, 270) state = 0 function open() if state == 0 then setElementRotation( barrier, 0, 0, 270) state = 1 else setElementRotation(barrier, 0, 270, 270) state = 0 end end addCommandHandler("gate", open)
  5. you mean that i need make addEventHandler("onMarkerLeave",marker , interior) and after for marker2 and world?
  6. yea and where is the problem?
  7. local marker = createMarker (1555.5 , -1675.6 , 16.9, "arrow", 1.5, 0, 150, 255, 255) local marker2 = createMarker (246.8, 62.2, 1004.6 , "arrow", 1.5, 0, 150, 255, 255) function interior (player) if (getElementType(player) == 'player' ) then setElementInterior(source, 6 ,246.7, 63.3, 1003.6) outputChatBox("You've entered Los Santos Police Derpartment (ID:6) Owner:State",player, 0 , 255, 150) end end addEventHandler("onMarkerHit", marker, interior) function world(player) if (getElementType(player) == 'player') then setElementInterior(source, 0, 1553.7, -1675.5, 16.1) end end addEventHandler("onMarkerHit", marker2, world) now apreas the message again but not interior
  8. local marker = createMarker (1555.5 , -1675.6 , 16.9, "arrow", 1.5, 0, 150, 255, 255) local marker2 = createMarker (246.8, 62.2, 1004.6 , "arrow", 1.5, 0, 150, 255, 255) addEventHandler("onMarkerHit", marker, interior) function interior (player) if (getElementType(player) == 'player' ) then setElementInterior(source, 6 ,246.7, 63.3, 1003.6) outputChatBox("You've entered Los Santos Police Derpartment (ID:6) Owner:State",player, 0 , 255, 150) end end addEventHandler("onMarkerHit", marker2, world) function world(player) if (getElementType(player) == 'player') then setElementInterior(source, 0, 1553.7, -1675.5, 16.1) end end
  9. <meta> <info author="Dimos_Rosso" type="gamemode" name="rp 2.0" description="My first MTA server"/> <map src="rp.map"/> <script src="rp.lua" /> <script src="object.lua"/> <script src="test.lua"/> </meta> Well the state i put it to move object and worked WARNING: rp\test.lua:3: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil] WARNING: rp\test.lua:16: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
  10. [12:44:52] WARNING: rp\test.lua:3: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil] [12:44:52] WARNING: rp\test.lua:16: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
  11. local marker = createMarker (1555.5 , -1675.6 , 16.9, "arrow", 1.5, 0, 150, 255, 255) state = 0 function interior() if state == 0 then setElementInterior(source, 6 ,246.7, 63.3, 1003.6) marker2 = createMarker (246.8, 62.2, 1004.6 , "arrow", 1.5, 0, 150, 255, 255) outputChatBox("You've entering Los Santos Police Derpartment (ID:6) Owner:State",getRootElement(), 0 , 255, 150) state = 1 else setElementInterior(source, 0, 1553.7, -1675.5, 16.1) state = 0 end end addEventHandler("onMarkerHit", marker, interior) addEventHandler("onMarkerHit", marker2, interior) No put the interior only aprears the message help
×
×
  • Create New...