KukiX
Wiek: 34 Na forum: 6720 dni Posty: 567
Piwa : 17560
SetTrainSpeed to funkcja do ustawiania pr?dko?ci poci?gu.
Gra?e? pewnie na mapie wipeout5.
Tu masz fukcje na Speedbooost:
Kod: function start()
SpeedBoost = {
createMarker (1769.36, -1158.17, 216.987, "corona", 5, 60, 255, 100, 105 ),
createMarker (1965.66, -1227.77, 166.971, "corona", 5, 60, 255, 100, 105 ),
createMarker (1906.15, -1643.35, 164.931, "corona", 5, 60, 255, 100, 105 ),
createMarker (1430.42, -1753.30, 118.720, "corona", 5, 60, 255, 100, 105 ),
createMarker (1473.03, -1751.03, 170.162, "corona", 5, 60, 255, 100, 105 ),
createMarker (1836.54, -1516.48, 169.160, "corona", 5, 60, 255, 100, 105 ),
createMarker (2026.86, -1456.15, 255.763, "corona", 5, 60, 255, 100, 105 ),
createMarker (1977.36, -1286.72, 383.113, "corona", 5, 60, 255, 100, 105 ),
createMarker (1845.49, -1326.47, 245.344, "corona", 5, 60, 255, 100, 105 ),
createMarker (1790.89, -1631.36, 195.339, "corona", 5, 60, 255, 100, 105 ),
createMarker (1470.72, -1623.86, 200.364, "corona", 5, 60, 255, 100, 105 ),
createMarker (1332.67, -1548.88, 246.432, "corona", 5, 60, 255, 100, 105 ),
createMarker (1702.74, -1351.29, 130.889, "corona", 5, 60, 255, 100, 105 ),
createMarker (1099.04, -1541.56, 192.859, "corona", 5, 60, 255, 100, 105 ),
createMarker (1542.42, -1183.14, 184.604, "corona", 5, 60, 255, 100, 105 ),
createMarker (1373.26, -1178.31, 288.364, "corona", 5, 60, 255, 100, 105 ),
}
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), start )
-- Add more markers to add more Speedboosts.^^^
Multiplier = 1.5 -- Change this to adjust how much boost you get, you can use decimals.
function SpeedBoost (player)
if player ~= getLocalPlayer() then return end
if getElementType(player) == "player" then
if isPedInVehicle ( player ) then
local car = getPedOccupiedVehicle(player)
if getVehicleController(car) == player then
speedx, speedy, speedz = getElementVelocity ( car ) -- get the velocity of the player
speedcnx = (speedx*Multiplier)
speedcny = (speedy*Multiplier)
speedcnz = (speedz*Multiplier)
setElementVelocity ( car, speedcnx, speedcny,speedcnz )
fixVehicle(car) -- fixes the vehicle
addVehicleUpgrade(car, 1010) -- adds nitro
playSoundFrontEnd(46)
end
end
end
end
addEventHandler ( "onClientMarkerHit", getResourceRootElement(getThisResource()), SpeedBoost )
Wyci?te z mapki wipeout5.