Jump to content

Timiimit

Members
  • Posts

    142
  • Joined

  • Last visited

Everything posted by Timiimit

  1. now i just need to turn speed. setElementVelocity ( vehicle, speedx, speedy, speedz - speedz^2 ) how to? this doesnt work
  2. function turn(thePlayer) local vehicle = getPedOccupiedVehicle(thePlayer) if (not vehicle) then return end local speedx, speedy, speedz = getElementVelocity(vehicle) local rX, rY, rZ = getVehicleRotation(vehicle) local actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) local kmh = actualspeed * 180 local mph = actualspeed * 111.847 setElementRotation(vehicle, rX, rY, rZ + 180) setElementVelocity ( vehicle, speedx, speedy, speedz - speedz^2 ) outputChatBox("You turned your vehicle with " .. tostring(kph) .. " km/h | " .. tostring(mph) .. " mph", thePlayer) end function bindTheKey() for index, player in pairs(getElementsByType("player")) do bindKey(player, "lctrl", "down", turn) outputChatBox("#00FF00You can now press #0000FF'left ctrl' #00FF00in vehicle to turn for 180 degrees!", player, 255, 255, 255, true) end end addEventHandler("onResourceStart", resourceRoot, bindTheKey) addEventHandler("onPlayerJoin", root, function() bindKey(source, "lctrl", "down", turn) end) doesnt work
  3. function turn(thePlayer) local vehicle = getPedOccupiedVehicle(thePlayer) if (not vehicle) then return end local speedx, speedy, speedz = getElementVelocity(vehicle) local rX, rY, rZ = getVehicleRotation(vehicle) local actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) local kmh = actualspeed * 180 local mph = actualspeed * 111.847 setElementRotation(vehicle, rX, rY, rZ + 180) setElementVelocity ( getPlayerFromName ( source ), speedx, speedy, speedz - speedz^2 ) outputChatBox("You turned your vehicle with " .. tostring(kph) .. " km/h | " .. tostring(mph) .. " mph", thePlayer) end function bindTheKey() for index, player in pairs(getElementsByType("player")) do bindKey(player, "lctrl", "down", turn) outputChatBox("#00FF00You can now press #0000FF'left ctrl' #00FF00in vehicle to turn for 180 degrees!", player, 255, 255, 255, true) end end addEventHandler("onResourceStart", resourceRoot, bindTheKey) addEventHandler("onPlayerJoin", root, function() bindKey(source, "lctrl", "down", turn) end)
  4. wait there is one more thing: i want to make opposite speed too! not that only car turnes!!!!!
  5. this doent work it says that rZ is nil value!
  6. Hi !!! I made 1 script but it looks like its not perfect. I want to make that when you would press left control [LCtrl] car of the driver would turn for 180 degrees with the same velocity(speed) and outputs in chatbox that you turned! This is what i have so far: function turn (thePlayer) speedx, speedy, speedz = getElementVelocity ( source ) pVehicle = getPedOccupiedVehicle(source) if isPedInVehicle ( source ) then actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) kmh = actualspeed * 180 mph = actualspeed * 111.847 setElementRotation(pVehicle,rX,rY,rZ+180) outputChatBox ( "You turned your Vehicle With " ..kph.. " km/h Or " ..mph.. " mph", source ) end end function bindKey ( thePlayer ) Bind( "LControl", turn ) outputChatBox( "#00FF00You can now press #0000FFLCtrl in vehicle to turn for 180 degrees!", source ) end addEventHandler( "onResourceStart", bindKey ) Thanks!
  7. Its in "maps" tab. Anyway I can see my maps there I just cant load them or any other map under "No gamemode".
  8. Oh! I forgot! By the way i cant see map there
  9. Its freeroam not race. I will try to make another map as soon as i can. (how to change what map to load???)
  10. What do you mean change dimentions? Yes it loads in map editor only in server not!
  11. Is: ...Multi Theft Auto/Server/Mods/Deathmatch/Resources Right directory for map?
  12. No error, only warning and info. Warning says: WARNING:burnout/burnout_c.lua:355:baad argument @ "setTimer" [Expected number at argument 3, got none]
  13. Hello all! I want to make my server but when i start it my map doesn't load. Resources loads normally only map doesn't. I don't know what to do to load it. I have map in: ...multi theft auto/server/mods/deathmatch/resources Name of the map is "SLO_stunt_map.map" it's in folder "SLO_stunt_map" with "meta.xml". Thanks!
×
×
  • Create New...