hello, is there any way to make the MTB bike not have a certain mileage (9999) I ride at a higher speed than is set by the server? Now, the MTB bike does not have a certain mileage, it rides max 70~80, but I would like to somehow get around such a thing, and pretend that I ride the bike on much more.
i only have chat gpt's code
i only have chat gpt's code
Code:
function OnPlayerCommandText(playerid, cmdtext)
if cmdtext == "/rideMTB" then
local vehicleid = GetPlayerVehicleID(playerid)
if vehicleid > 0 then
local modelid = GetVehicleModel(vehicleid)
if modelid == 510 then -- Model ID 510 is the Mountain Bike (MTB)
SetVehicleVelocity(vehicleid, 0.0, 0.0, 0.2)
return true
else
SendClientMessage(playerid, 0xFFFFFF00, "You are not in an MTB bike.")
end
else
SendClientMessage(playerid, 0xFFFFFF00, "You are not in any vehicle.")
end
return false
end
end
function GetMaxSpeed(vehicleid)
local speedX, speedY, speedZ = GetVehicleVelocity(vehicleid)
return math.sqrt(speedX^2 + speedY^2 + speedZ^2)
end
function OnPlayerCommandText(playerid, cmdtext)
if cmdtext == "/maxSpeedMTB" then
local vehicleid = GetPlayerVehicleID(playerid)
if vehicleid > 0 then
local modelid = GetVehicleModel(vehicleid)
if modelid == 510 then -- Model ID 510 is the Mountain Bike (MTB)
local maxSpeed = GetMaxSpeed(vehicleid)
SendClientMessage(playerid, 0xFFFFFF00, "Your MTB's maximum speed is: " .. maxSpeed)
return true
else
SendClientMessage(playerid, 0xFFFFFF00, "You are not in an MTB bike.")
end
else
SendClientMessage(playerid, 0xFFFFFF00, "You are not in any vehicle.")
end
return false
end
end