Jump to content

valerr7

Members
  • Posts

    3
  • Joined

  • Last visited

valerr7's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Hi. I'm new to this, so i need a little bit of help. I made a Marker and if i stand on it and press 'e', it teleports me into a Mapped Factory. It works to go in and out, separately, but when I combine the 2 teleports it just drops me to the same place, where I tried to enter/exit. I don't know if i need some sort of delay or anything like that. I can't solve this myself. Thank you for your help. local enterFactory = createMarker ( 967.33954, 2160.80469, 10, "cylinder", 1, 0, 255, 255, 200 ) function markerHit( player ) if getElementType( player ) == "player" and source == enterFactory then bindKey( player, "e", "down", teleport ) outputChatBox( "Nyomd meg az 'e' gombot, hogy belépj a gyárba.", player, 200, 200, 0 ) end end addEventHandler( "onMarkerHit", getRootElement(), markerHit ) function teleport( player, key, keyState ) setElementPosition( player, 918.74597, 2204.99878, -78.39844 ) setPedRotation( player, 90 ) unbindKey ( player, "e", "down", teleport ) end local exitFactory = createMarker ( 918.74597, 2204.99878, -78.39844, "cylinder", 1, 0, 255, 255, 200 ) function markerHit( player ) if getElementType( player ) == "player" and source == exitFactory then bindKey( player, "e", "down", teleport ) outputChatBox( "Nyomd meg az 'e' gombot, hogy belépj a gyárba.", player, 200, 200, 0 ) end end addEventHandler( "onMarkerHit", getRootElement(), markerHit ) function teleport( player, key, keyState ) setElementPosition( player, 967.33954, 2160.80469, 11 ) setPedRotation( player, 90 ) unbindKey ( player, "e", "down", teleport ) end
  2. Hi! I just started doing codes, and I can't figure out how can I make the vehicle that i drive into the marker teleport to the middle of the marker and look in a direction, please countain explanation! The code: function onMarkerHit(hitPlayer, dim) if localPlayer == hitPlayer and getElementData(source, "marker") == true then if isPedInVehicle(localPlayer) then local veh = getPedOccupiedVehicle(localPlayer) local seat = getPedOccupiedVehicleSeat(localPlayer) if (veh) and seat == 0 then if getElementData(veh, "veh:owner") == getElementData(localPlayer, "acc:id") and getElementData(veh, "veh:id") > 0 or getElementData(localPlayer, "acc:admin") >= 7 then addEventHandler("onClientRender", root) setElementFrozen(veh, true) else outputChatBox("#D64541[Autóker]:#ffffff Ez a jármű nem a tiéd.", 255, 255, 255, true) end end end end end addEventHandler("onClientMarkerHit", getRootElement(), onMarkerHit)
×
×
  • Create New...