Make a new txt file. Copy in this code. Click on Save As. Yourname.lua
Open the meta file in notepad and write in
<script src="Yourname.lua" type="client" />
Just works when you are making a race map (DM,DD,Race)
You have to test with race too. Not working if you just press F5.
Change the X,Y,Z to your cords.
You can change the
Multiplier = 1.5
how much you want. (Dont go higher then 5.0)
Do not change anything under
fuction SpeedBoost (player)
function start()
SpeedBoost = {
createMarker (X, Y, Z, "corona", 5, 60, 255, 100, 255 ),
}
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), start )
Multiplier = 1.5
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 )
speedcnx = (speedx*Multiplier)
speedcny = (speedy*Multiplier)
speedcnz = (speedz*Multiplier)
setElementVelocity ( car, speedcnx, speedcny,speedcnz )
fixVehicle(car) -- fixes the vehicle
playSoundFrontEnd(46)
end
end
end
end
addEventHandler ( "onClientMarkerHit", getResourceRootElement(getThisResource()), SpeedBoost )