Jump to content

n0skillg3t

Members
  • Posts

    4
  • Joined

  • Last visited

Details

  • Gang
    Ballas

n0skillg3t's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Multiplier = 1.3 marker1 = createMarker(-6558.2998046875, 2801.099609375, 706.09997558594 , "cylinder" , 29, 0, 0, 255, 255) marker2 = createMarker(-6177.599609375, 2761.2998046875, 691.09997558594 , "corona" , 15, 255, 0, 0, 255) marker3 = createMarker(-6176.6000976563, 2672.3000488281, 634.29998779297 , "corona" , 23, 0, 255, 0, 255) function MarkerHit (player) if (source == marker1) then if (player ~= localPlayer) then return end local car = getPedOccupiedVehicle(player) speedx, speedy, speedz = getElementVelocity ( car ) speedcnx = (speedx*Multiplier) speedcny = (speedy*Multiplier) speedcnz = (speedz*Multiplier) setElementVelocity ( car, speedcnx, speedcny,speedcnz ) fixVehicle(car) addVehicleUpgrade(car, 1010) playSoundFrontEnd(46) elseif (source == marker2) then if (player ~= localPlayer) then return end speedx, speedy, speedz = getElementVelocity ( car ) speedcnx = (speedx*Multiplier) speedcny = (speedy*Multiplier) speedcnz = (speedz*Multiplier) setElementVelocity ( car, speedcnx, speedcny,speedcnz ) fixVehicle(car) addVehicleUpgrade(car, 1010) playSoundFrontEnd(46) elseif (source == marker3) then if (player ~= localPlayer) then return end local car = getPedOccupiedVehicle( player ) speedx, speedy, speedz = getElementVelocity ( car ) local x, y, z = getElementRotation( car ) local newz = z + 180 setElementRotation ( car, x, y, newz ) setElementVelocity ( car, speedx, speedy,speedz ) end end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) This is my whole script, in marker1 and marker2 it should just speed up, but in marker3 it should change the car direction like in s0beit when you press Backspace. best regards, n0skillg3t
  2. It works now, but the speed is gone away when my car direction changed, where is the problem ? I want to have it like with s0beit when you press backspace
  3. Okey, but the rotation thingy does not work.. I wanna change the car direction about 360° so that front is back and back is front.. best regards, n0skillg3t
  4. Hey guys, i dont see the mistake Multiplier = 1.3 marker1 = createMarker(-6558.2998046875, 2801.099609375, 706.09997558594 , "cylinder" , 29, 0, 0, 204, 0) marker2 = createMarker(-6177.599609375, 2761.2998046875, 691.09997558594 , "cylinder" , 1, 255, 0, 0, 255) marker3 = createMarker(-6176.8994140625, 2735.7998046875, 655.40002441406 , "corona" , 1, 0, 255, 0, 255) function MarkerHit (hitMarker, player) if source == marker1 then outputChatBox("It Was corona!") local car = getPedOccupiedVehicle(player) speedx, speedy, speedz = getElementVelocity ( car ) speedcnx = (speedx*Multiplier) speedcny = (speedy*Multiplier) speedcnz = (speedz*Multiplier) setElementVelocity ( car, speedcnx, speedcny,speedcnz ) fixVehicle(car) addVehicleUpgrade(car, 1010) playSoundFrontEnd(46) end if source == marker2 then outputChatBox("It Was corona!") local car = getPedOccupiedVehicle(player) speedx, speedy, speedz = getElementVelocity ( car ) speedcnx = (speedx*Multiplier) speedcny = (speedy*Multiplier) speedcnz = (speedz*Multiplier) setElementVelocity ( car, speedcnx, speedcny,speedcnz ) fixVehicle(car) addVehicleUpgrade(car, 1010) playSoundFrontEnd(46) end if source == marker3 then outputChatBox("It was cylinder!") local car = getPedOccupiedVehicle(player) local x, y, z = getVehicleRotation ( car ) local newz = z + 360 setVehicleRotation ( car, x, y, newz ) end end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) So, it does print out "It was corona!" but after that, nothing happens.. best regards, n0skillg3t Edit: I found the mistake, hitMarker is serverside
×
×
  • Create New...