Skip to content

Commit

Permalink
v1.1.2
Browse files Browse the repository at this point in the history
- Added a main window to the script.
- Added a torque slider to the drift feature which allows the users to choose how much power they want to have when drifting.
  • Loading branch information
xesdoog committed Aug 14, 2024
1 parent 3ef6f6e commit c2c99ac
Showing 4 changed files with 149 additions and 39 deletions.
23 changes: 23 additions & 0 deletions data/refs.lua
Original file line number Diff line number Diff line change
@@ -337,4 +337,27 @@ pe_config_flags_T = {
{id = 286, bool = true},
{id = 294, bool = true},
{id = 435, bool = true},
}

random_quotes_T = {
"FACT: AWD drifting isn't drifting.",
"People who put M badges on a non-M BMW should go to prison.",
"Speed has never killed anyone. Suddenly becoming stationary, that's what gets you.",
"Fun Fact: lonelybud is is not really lonely. He has four wives.",
"Being a lorry driver is hard: change gear change gear change gear change gear, check your mirrors, murder a prostitute, change gear change gear, murder... That's a lot of effort in a day.",
"Jaguar is pronounced just the way it's spelled.",
"Some say, the person who wrote this script has a full size tattoo of his face... on his face.",
"Fun Fact: Harmless is not really harmless. He's a Kung-Fu master.",
"The drift feature in this script is an ingenious solution to a problem that should never have existed.",
"A car guy's diet: Gasoline and burnt rubber.",
"Fun Fact: Yimura is the cousin of LMFAO, an infamous chinese hacker.",
"There is never enough horsepower, just not enough traction.",
"The best way to make a small fortune racing is to start with a large fortune and work your way down.",
"Fun Fact: DeadlineEm has an issue with deadlines. He never meets them.",
"You can sleep in your car, but you can't race your house.",
"It don't matter if you win by an inch or a mile. Winning's winning.",
"Fun Fact: gir489returns will hurt your feelings.",
"There's no 'wax on wax off' with drifting. You learn by doing it. The first drifters invented drifting out in the touge by feeling it. So feel it.",
"Dude, I almost had you!\10\10 ¤ RIP, Paul Walker ¤",
"Fun Fact: USBMenus has a tattoo of a USB stick on his forehead. He really loves USBs.",
}
8 changes: 8 additions & 0 deletions lib/Translations.lua
Original file line number Diff line number Diff line change
@@ -345,6 +345,14 @@ Labels = {
{iso = "pt-BR", text = "Isso equipará seu carro com pneus de drift sempre que você pressionar [Left Shift]. Seus pneus serão zerados quando você soltar o botão."},
},

["driftToruqe_tt"] = {
{iso = "en-US", text = "Increases you vehicle's toruqe when drifting. Works for both 'Drift Mode' and 'Drift Tires'."},
{iso = "de-DE", text = "Erhöht das Drehmoment des Fahrzeugs beim Driften.Funktioniert sowohl für 'Drift Mode' und 'Drift Tires'."},
{iso = "fr-FR", text = "Augmente le couple du véhicule lorque vous driftez. Fonctionne à la fois pour 'Drift Mode' et 'Drift Tires'."},
{iso = "it-IT", text = "Aumenta la coppia del veicolo durante le derapate. Funziona sia per 'Drift Mode' che per 'Drift Tires'."},
{iso = "pt-BR", text = "Aumenta o torque de seu veículo ao fazer drifting. Funciona para ambos 'Drift Mode' e 'Drift Tires'."},
},

["DriftSmoke_tt"] = {
{iso = "en-US", text = "Creates a smoke effect when drifting. You can change the smoke color but it's not related to the games tire smoke color."},
{iso = "de-DE", text = "Erzeugt einen Raucheffekt beim Driften. Sie können die Rauchfarbe ändern, aber es ist nicht auf die Spiele Reifen Rauch Farbe bezogen."},
50 changes: 36 additions & 14 deletions lib/samurais_utils.lua
Original file line number Diff line number Diff line change
@@ -197,7 +197,6 @@ lua_Fn = {
end
end,

---Iterates over bits.
---@param n integer
get_bit = function(n)
return 2 ^ (n - 1)
@@ -222,12 +221,12 @@ lua_Fn = {
---@param n integer
---@param x integer
set_bit = function(n, x)
return lua_Fn.hasbit(x, n) and x or x + n
return lua_Fn.has_bit(x, n) and x or x + n
end,

---Sets `p` bit from `x`
clear_bit = function(x, n)
return lua_Fn.hasbit(x, n) and x - n or x
return lua_Fn.has_bit(x, n) and x - n or x
end,

---Lua version of Bob Jenskins' "Jenkins One At A Time" hash function (https://en.wikipedia.org/wiki/Jenkins_hash_function).
@@ -1081,27 +1080,50 @@ Game = {

Vehicle = {

-- Returns the name of the vehicle localPlayer is sitting in.
name = function()
---Returns the name of the specified vehicle.
---You can specify either an entity number or a vehicle hash.
---@param vehicle number
name = function(vehicle)
---@type string
local retVal
if not Game.Self.isOnFoot() then
retVal = vehicles.get_vehicle_display_name(Game.getEntityModel(self.get_veh()))
if vehicle <= 65535 then
if ENTITY.IS_ENTITY_A_VEHICLE(vehicle) then
retVal = vehicles.get_vehicle_display_name(Game.getEntityModel(vehicle))
else
retVal = ""
end
elseif vehicle > 65535 then
if STEAMING.IS_THIS_MODEL_A_VEHICLE(vehicle) then
retVal = vehicles.get_vehicle_display_name(vehicle)
else
retVal = ""
end
else
retVal = ""
end
return retVal
end,

-- Returns the manufacturer name of the vehicle localPlayer is sitting in.
manufacturer = function()
---Returns the manufacturer's name of the specified vehicle.
---You can specify either an entity number or a vehicle hash.
---@param vehicle number
manufacturer = function(vehicle)
---@type string
local retVal
if PED.IS_PED_SITTING_IN_ANY_VEHICLE(self.get_ped()) then
local mfr = VEHICLE.GET_MAKE_NAME_FROM_VEHICLE_MODEL(Game.getEntityModel(self.get_veh()))
retVal = (mfr:lower():gsub("^%l", string.upper))
else
retVal = ""
if vehicle <= 65535 then
if ENTITY.IS_ENTITY_A_VEHICLE(vehicle) then
local mfr = VEHICLE.GET_MAKE_NAME_FROM_VEHICLE_MODEL(Game.getEntityModel(vehicle))
retVal = (mfr:lower():gsub("^%l", string.upper))
else
retVal = ""
end
elseif vehicle > 65535 then
if STEAMING.IS_THIS_MODEL_A_VEHICLE(vehicle) then
local mfr = VEHICLE.GET_MAKE_NAME_FROM_VEHICLE_MODEL(vehicle)
retVal = (mfr:lower():gsub("^%l", string.upper))
else
retVal = ""
end
end
return retVal
end,
Loading

0 comments on commit c2c99ac

Please sign in to comment.