Jump to content

Stalker157

Members
  • Posts

    6
  • Joined

  • Last visited

Details

  • Location
    Egypt
  • Occupation
    Player
  • Interests
    Scripting

Stalker157's Achievements

Vic

Vic (3/54)

0

Reputation

  1. All I want to know is how to change between my setCameraMatrix with left or right keys and if possible with up and down.
  2. Now I've managed to bind the key "F" to the marker I have made in ammu-nation local Marker1 = createMarker(295.70001, -38.2, 1000.6, "cylinder", 1.5, 255, 255, 0, 0) setElementInterior(Marker1, 1) function MarkerHit(player) if getElementType(player) == "player" and source == Marker1 then bindKey(player, "f", "down", camera) outputChatBox("Press F to buy weapons", player) end end addEventHandler("onMarkerHit", getRootElement(), MarkerHit) function MarkerLeave(player) if getElementType(player) == "player" and source == Marker1 then unbindKey(player, "f", "down", camera) end end addEventHandler("onMarkerLeave", getRootElement(), MarkerLeave) function camera(player, key, keyState) setCameraMatrix(player, 293.10001, -39.8, 1002.8, 293.10001 , -41.8, 1002.8) end Now I want to know how to make the camera move from an object to another one using "Left" and "Right" arrow. The places I want the camera goes to setCameraMatrix(293.10001, -39.8, 1002.8, 293.10001, -41.8, 1002.8) setCameraMatrix(293, -39.8, 1002.4, 293, -41.8, 1002.4) setCameraMatrix(293, -39.8, 1002, 293, -41.8, 1002) setCameraMatrix(293.79999, -39.83, 1002.7, 293.79999, -41.83, 1002.7) setCameraMatrix(293.79999, -39.8, 1002.3, 293.79999, -41.8, 1002.3) setCameraMatrix(293.79999, -39.83, 1001.95, 293.79999, -41.83, 1001.95) setCameraMatrix(295, -39.8, 1002.05, 295, -41.8, 1002.05) setCameraMatrix(294.89999, -39.8, 1002.33, 294.89999, -41.8, 1002.33) setCameraMatrix(294.89999, -39.8, 1002.81, 294.89999, -41.8, 1002.81) setCameraMatrix(296.29999, -39.8, 1002.53, 296.29999, -41.8, 1002.53) setCameraMatrix(296.29999, -39.8, 1002, 296.29999, -41.8, 1002) setCameraMatrix(297.89999, -39.8, 1002.6, 297.89999, -41.8, 1002.6) setCameraMatrix(297.89999, -39.8, 1002.1, 297.89999, -41.8, 1002.1) setCameraMatrix(299.39999, -39.6, 1002.4, 299.39999, -41.6, 1002.4) setCameraMatrix(298.29999, -36.4, 1001.8, 298.29999, -38.4, 1001.8) setCameraMatrix(297.39999, -37, 1001.84, 297.39999, -39, 1001.84) setCameraMatrix(296.70001, -37.04, 1001.6, 296.70001, -39.04, 1001.6) setCameraMatrix(296.39999, -37.04, 1001.577, 296.39999, -39.04, 1001.577) setCameraMatrix(293.20001, -37, 1001.6, 293.20001, -39, 1001.6) setCameraMatrix(293.60001, -37, 1001.7, 293.60001, -39, 1001.7) setCameraMatrix(294.20001, -37, 1001.635, 294.20001, -39, 1001.635) And can anyone explain these?
  3. I can't figure out how to use them..
  4. Hello, I have some questions about scripting MTA. First, what is the difference between Server functions and Client functions? And when to use them? Currently I'm using Server functions only. Second, I'm trying to make ammunation script like this: But how to change the camera position to view every weapon by pressing left and right arrow? And how to make the player able to buy the selected weapon? Also how to cancel the player from buying weapons, for example press 'Enter'.
  5. Hello, I'm just trying to make a respawn vehicle script for my server but it's not working. function isVehicleOccupied(vehicle) assert(isElement(vehicle) and getElementType(vehicle) == "vehicle", "Bad argument @ isVehicleOccupied [expected vehicle, got " .. tostring(vehicle) .. "]") local _, occupant = next(getVehicleOccupants(vehicle)) return occupant and true, occupant end function respawn(car) if not isVehicleOccupied(Taxi) then respawnVehicle(Taxi) end end function inactive(vehicle) local car = vehicle setTimer(respawn, 5000, 1 , car) end addEventHandler ("onPlayerVehicleExit", root, inactive) I wanna make it if a player exited a vehicle he was driving it will respawn after some time(5 seconds for now, just testing), but I always get error Can anyone help?
×
×
  • Create New...