Skip to content

Commit

Permalink
Mass update
Browse files Browse the repository at this point in the history
Added gitignore
Removed unused files and references
cl_general added keymap
cl_variables defaulted everything to off
cl_weapons general tidy
trainer.html added credit
sv_config defaulted server-side saving to off
  • Loading branch information
Firecul committed Jan 1, 2018
1 parent 61959a6 commit 1b2770b
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.vs/
4 changes: 1 addition & 3 deletions __resource.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ files {
"nui/trainer.html",
"nui/trainer.js",
"nui/trainer.css",
"nui/Roboto.ttf",
"nui/Lemonada.ttf",
"nui/Roboto-Black.ttf"
"nui/Roboto.ttf"
}

client_scripts {
Expand Down
19 changes: 15 additions & 4 deletions cl_general.lua
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,17 @@ end)
-- should the trainer be shown?
showtrainer = false

--[[local Keys = {
["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177,
["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18,
["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70,
["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178,
["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173,
["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118
}]]

-- Constantly check for trainer movement.
Citizen.CreateThread( function()
Expand All @@ -228,24 +239,24 @@ Citizen.CreateThread( function()
})
end
end

if ( IsControlJustReleased( 0, 170 ) or IsDisabledControlJustReleased( 0, 170 ) ) and GetLastInputMethod( 0 ) and not blockinput and ((settings["adminOnlyTrainer"] == true and adminStatus == true) or settings["adminOnlyTrainer"] == false) then -- f3
teleportToWaypoint()
end

if ( IsControlJustReleased( 0, 289 ) or IsDisabledControlJustReleased( 0, 289 ) ) and GetLastInputMethod( 0 ) and ((settings["adminOnlyNoclip"] == true and adminStatus == true) or settings["adminOnlyNoclip"] == false) then
if ( IsControlJustReleased( 0, 289 ) or IsDisabledControlJustReleased( 0, 289 ) ) and GetLastInputMethod( 0 ) and ((settings["adminOnlyNoclip"] == true and adminStatus == true) or settings["adminOnlyNoclip"] == false) then --f2
toggleNoClipMode()
end

if showtrainer and not blockinput then
if ( IsControlJustPressed( 1, 199 ) or IsControlJustPressed( 1, 200 ) ) then
if ( IsControlJustPressed( 1, 199 ) or IsControlJustPressed( 1, 200 ) ) then --P and Pause/break?
showtrainer = false
SendNUIMessage({
hidetrainer = true
})
end

if ( IsControlJustReleased( 1, 201 ) or IsDisabledControlJustReleased( 1, 201 ) ) then -- enter
if ( IsControlJustReleased( 1, 201 ) or IsDisabledControlJustReleased( 1, 201 ) ) then -- Numpad enter
SendNUIMessage({
trainerenter = true
})
Expand Down
22 changes: 11 additions & 11 deletions cl_variables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,26 @@ maxPlayers = 32;

--General Settings
featurePlayerBlips = false;
featurePlayerBlipNames = true;
featurePlayerBlipNames = false;
featurePlayerHeadDisplay = false;
-- The above will sync by once the blip system rewrite happens
featurePlayerNotifications = true;
featureDeathNotifications = true;
featurePlayerNotifications = false;
featureDeathNotifications = false;
featureHideMap = false;
featureHideHud = false;
featureBigHud = false;
featureMapBlips = true;
featureMapBlips = false;
featureAreaStreetNames = false;
featureRestoreAppearance = true;
featureRestoreAppearance = false;
--featureRestoreWeapons = false;


--Vehicle Options
featureCloseInstantly = false;
featureSpeedometer = false;
featureSpawnInsideCar = true;
featureSpawnCarInFront = true
featureDeleteLastVehicle = true;
featureSpawnInsideCar = false;
featureSpawnCarInFront = false
featureDeleteLastVehicle = false;
featureNoFallOff = false;
featureNoDragOut = false;
featureNoHelmet = false;
Expand All @@ -86,7 +86,7 @@ featurePlayerSuperJump = false;
featureNoRagDoll = false;
featurePlayerInvisible = false;
featurePlayerDrunk = false;
featurePlayerInfiniteStamina = true;
featurePlayerInfiniteStamina = false;
featurePlayerInfiniteParachutes = false;
featurePlayerInfiniteAmmo = false;
featurePlayerNoReload = false;
Expand All @@ -107,8 +107,8 @@ featureWeatherFreeze = false;


-- Voice
featureShowVoiceChatSpeaker = true;
featureVoiceChat = true;
featureShowVoiceChatSpeaker = false;
featureVoiceChat = false;
-- One of the below must be true.
-- If multiple are true only the first one will apply.
featureVPAllPlayers = true;
Expand Down
7 changes: 3 additions & 4 deletions cl_weapons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function maxAmmoWeapon(weaponName)
local weapon = GetHashKey(weaponName)
local ammoType = GetPedAmmoType(playerPed, weapon)
if(HasPedGotWeapon(playerPed, weapon, 0))then
SetPedAmmoByType(playerPed, ammoType, 9999) -- [OLD] AddAmmoToPed( playerPed, weapon, 9999 )
SetPedAmmoByType(playerPed, ammoType, 9999) -- [OLD] AddAmmoToPed( playerPed, weapon, 9999 )
drawNotification("Max Ammo")
end
end
Expand All @@ -225,9 +225,8 @@ function addWeaponClip(weaponName)
local ammoType = GetPedAmmoType(playerPed, weapon)

if(HasPedGotWeapon(playerPed, weapon, 0))then
local maxAmmo = GetWeaponClipSize(weapon)
--SetAmmoInClip(playerPed, weapon, maxAmmo) -- Refill Current Clip
AddAmmoToPed(playerPed, weapon, maxAmmo)
local maxAmmo = GetWeaponClipSize(weapon) -- [OLD] local maxAmmo = GetMaxAmmoInClip( playerPed, weapon, true )
AddAmmoToPed(playerPed, weapon, maxAmmo) -- [OLD] SetAmmoInClip(playerPed, weapon, maxAmmo) -- Refill Current Clip
drawNotification("Ammo Clip Added")
end
end
Expand Down
Binary file removed nui/Lemonada.ttf
Binary file not shown.
Binary file removed nui/Roboto-Black.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions nui/trainer.html
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@
<div id="aboutmenu" data-parent="mainmenu">
<p class="traineroption">Mello Trainer v0.5.5</p>
<p class="traineroption">Made By TheStonedTurtle</p>
<p class="traineroption">Updated by Firecul</p>
<p class="traineroption">Special Thanks To:</p>
<p class="traineroption">WolfKnight</p>
<p class="traineroption">All My Beta Testers</p>
Expand Down
2 changes: 1 addition & 1 deletion sv_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Toggles the vehicle and skin saving system.
Options: true, false
-------------------------------------------------------------]]
local localSaving = true
local localSaving = false

--[[-----------------------------------------------------------
Name: steamOnly
Expand Down

0 comments on commit 1b2770b

Please sign in to comment.