Jump to content

Scommer

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Scommer

  1. In DaK script unbindkey doesn't work so i made it working after long time thinking local enterLSPD = createMarker ( 1554.7901611328, -1675.5651855469, 15.116052627563, "cylinder", 1.1, 0, 255, 0, 175 ) function markerHit( player ) if getElementType( player ) == "player" and source == enterLSPD then bindKey( player, "f", "down", teleport ) end end addEventHandler( "onMarkerHit", getRootElement(), markerHit ) function teleport( player, key, keyState ) setElementInterior( player, 6, 246.78932189941 , 62.632732391357, 1002.6146240234 ) setElementPosition( player, 247.78932189941, 65.632732391357, 1004.6146240234 ) setPedRotation( player, 90 ) unbindKey ( player, "f", "down", teleport ) end
  2. I'm trying to make that when player hit the marker and press "f" button he will be teleported to interior,but i doing something wrong cuz when i hit marker it teleports me to interior,but i wanna make that if i press "f" button only then marker teleport me to interior. local enterLSPD = createMarker ( 1554.7901611328, -1675.5651855469, 15.116052627563, "cylinder", 1.1, 0, 255, 0, 175 ) function MarkerHit ( player, hitPlayer, matchingDimensio, key, keyState ) if bindKey ( player, "f", "down", MarkerHit ) and getElementType(hitPlayer)=="player" and source == enterLSPD then setElementInterior( hitPlayer, 6, 246.78932189941 , 62.632732391357, 1002.6146240234 ) setElementPosition(hitPlayer,247.78932189941,65.632732391357,1004.6146240234) setPedRotation(hitPlayer,90) end end function bindKeyLSPD ( player, commandName ) bindKey ( player, "f", "down", MarkerHit ) end addEventHandler ( "onPlayerJoin", getRootElement(), bindKeyLSPD )
  3. Scommer

    Nothing

    I found a bug or something when cylinder size is 1.0 i didn't test with 0.x but i think it's only with 1.0.So when cylinder size is 1.0 function deosn't working
  4. Scommer

    Nothing

    When i hit the marker nothing happens but with first example everything is ok.
  5. Scommer

    Nothing

    I have a probelm i copy the script from my olders gamemodes,but now i want to change coordinates and marker doesn't working.Look and say where you see the differences. Working Fine local teleport = createMarker ( 2232.8212890625, -1159.7487792969, 24.890640258789, "cylinder", 1.5, 0, 255, 0, 175 ) function MarkerHit ( hitPlayer, matchingDimensio ) if getElementType(hitPlayer)=="player" and source == teleport then setElementInterior( hitPlayer, 15, 2217.6250 , -1150.6580, 1025.7970 ) setElementPosition(hitPlayer,2216,-1150,1026) setPedRotation(hitPlayer,90) end end addEventHandler("onMarkerHit", getRootElement (), MarkerHit) Doesn't Working local teleport = createMarker ( 1554.7901611328, -1675.5651855469, 15.116052627563, "cylinder", 1, 0, 0, 255, 255 ) function MarkerHit ( hitPlayer, matchingDimensio ) if getElementType(hitPlayer)=="player" and source == teleport then setElementInterior( hitPlayer, 6, 247 , 62, 1002 ) setElementPosition(hitPlayer,247,62,1002) setPedRotation(hitPlayer,90) end end addEventHandler("onMarkerHit", getRootElement (), MarkerHit) Can you say where you see the differences between these functions exept coordinates.
  6. Thanks for helping really,but now i need to make that arrow_l turns previous camera and with "enter" make a spawn on camera number If camera is 3rd then spawn will be 3rd I think i'm get learning Lua from hardest things
  7. Scommer

    Scripting

    You're from lithuania?
  8. So now if want to make that arrow_l turns previous camera i need to count presses again ? Or what?
  9. can you give me an example or something how to count how many times players pressed the button?
  10. I'm making changeable cameras with bind key "arrow_r" but i'm fucked up somewhere so i need your help. function setCameraOnPlayerJoin() fadeCamera(source, true, 1) setCameraMatrix(source, 1769, -1846, 25, 1743, -1862, 14) --- Starting Camera end function cameraNext ( player, key, state ) setCameraMatrix(player, 792, -1320, 24, 823, -1341, 14) --- 1st setCameraMatrix(player, 2229, -2640, 25, 2256, -2609, 9) ---2nd setCameraMatrix(player, 1675, -2333, 25, 1643, -2333, 14) --- 3rd setCameraMatrix(player, 2302, -2159, 26, 2299, -2126, 14) ---4th end function onPlayerJoin() bindKey ( source, "arrow_r", "down", cameraNext ) end addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerJoin ) addEventHandler ( "onPlayerJoin", getRootElement(), setCameraOnPlayerJoin ) When i press arrow_r starting camera changes to camera 4th and then when i want to press arrow_r nothing happens.So i need your help how to make that starting camera change to 1st then 2nd then 3rd and etc
×
×
  • Create New...