Skip to content

Commit

Permalink
Added missing glitches and world properties
Browse files Browse the repository at this point in the history
  • Loading branch information
FileEX committed Aug 9, 2023
1 parent 507a049 commit cb31d68
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 6 deletions.
50 changes: 45 additions & 5 deletions [admin]/admin2/client/main/admin_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ aServerTab = {
HitAnim = 'Hit Anim',
FastSprint = 'Fast Sprint',
BadDrivebyHitBox = 'Bad Driveby Hit Box',
QuickStand = 'Quick Stand'
QuickStand = 'Quick Stand',
KickoutOfVehicle_OnModelReplace = 'Kickout Of Vehicle On Model Replace'
},
worldproperties = {
HoverCars = 'Hover Cars',
Expand All @@ -29,7 +30,10 @@ aServerTab = {
RandomFoliage = 'Random Foliage',
SniperMoon = 'Sniper Moon',
ExtraAirResistance = 'Extra Air Resistance',
UnderWorldWarp = 'Under World Warp'
UnderWorldWarp = 'Under World Warp',
VehiclesSunGlare = "Vehicles Sun Glare",
CoronaZTest = "Corona Z Test",
WaterCreatures = "Water Creatures"
}
}

Expand Down Expand Up @@ -130,11 +134,11 @@ function aServerTab.Create(tab)
i = i + 1
end

local headerPosition = 0.060 + (0.045 * i)
local headerPosition = 0.025 + (0.045 * i)
guiCreateHeader(0.65, headerPosition, 0.30, 0.035, "Special world properties:", true, tab)
local i2 = 1
for k,v in pairs(aServerTab.worldproperties) do
aServerTab[k] = guiCreateCheckBox(0.66, headerPosition + (0.045 * i2), 0.40, 0.04, v, false, true, tab, 'setworldproperty')
aServerTab[k] = guiCreateCheckBox(0.66, headerPosition + (0.0375 * i2), 0.40, 0.04, v, false, true, tab, 'setworldproperty')
guiSetEnabled(aServerTab[k], true)
i2 = i2 + 1
end
Expand Down Expand Up @@ -347,6 +351,14 @@ function aServerTab.onClientClick(button)
"quickstand",
iif(guiCheckBoxGetSelected(aServerTab.QuickStand), "on", "off")
)
elseif (source == aServerTab.KickoutOfVehicle_OnModelReplace) then
triggerServerEvent(
"aServer",
localPlayer,
"setglitch",
"kickoutofvehicle_onmodelreplace",
iif(guiCheckBoxGetSelected(aServerTab.KickoutOfVehicle_OnModelReplace), "on", "off")
)
elseif (source == aServerTab.HoverCars) then
triggerServerEvent(
"aServer",
Expand Down Expand Up @@ -411,6 +423,30 @@ function aServerTab.onClientClick(button)
"underworldwarp",
iif(guiCheckBoxGetSelected(aServerTab.UnderWorldWarp), "on", "off")
)
elseif (source == aServerTab.VehiclesSunGlare) then
triggerServerEvent(
"aServer",
localPlayer,
"setworldproperty",
"vehiclesunglare",
iif(guiCheckBoxGetSelected(aServerTab.VehiclesSunGlare), "on", "off")
)
elseif (source == aServerTab.CoronaZTest) then
triggerServerEvent(
"aServer",
localPlayer,
"setworldproperty",
"coronaztest",
iif(guiCheckBoxGetSelected(aServerTab.CoronaZTest), "on", "off")
)
elseif (source == aServerTab.WaterCreatures) then
triggerServerEvent(
"aServer",
localPlayer,
"setworldproperty",
"watercreatures",
iif(guiCheckBoxGetSelected(aServerTab.WaterCreatures), "on", "off")
)
end
end
end
Expand Down Expand Up @@ -459,12 +495,15 @@ function aServerTab.onRefresh()
guiCheckBoxSetSelected(aServerTab.SniperMoon, isWorldSpecialPropertyEnabled("snipermoon"))
guiCheckBoxSetSelected(aServerTab.ExtraAirResistance, isWorldSpecialPropertyEnabled("extraairresistance"))
guiCheckBoxSetSelected(aServerTab.UnderWorldWarp, isWorldSpecialPropertyEnabled("underworldwarp"))
guiCheckBoxSetSelected(aServerTab.VehiclesSunGlare, isWorldSpecialPropertyEnabled("vehiclesunglare"))
guiCheckBoxSetSelected(aServerTab.CoronaZTest, isWorldSpecialPropertyEnabled("coronaztest"))
guiCheckBoxSetSelected(aServerTab.WaterCreatures, isWorldSpecialPropertyEnabled("watercreatures"))

triggerServerEvent("aServerGlitchRefresh", localPlayer)
end

addEvent("aClientRefresh", true)
addEventHandler("aClientRefresh", localPlayer, function(quickreload, fastmove, fastfire, crouchbug, highcloserangedamage, hitanim, fastsprint, baddrivebyhitbox, quickstand)
addEventHandler("aClientRefresh", localPlayer, function(quickreload, fastmove, fastfire, crouchbug, highcloserangedamage, hitanim, fastsprint, baddrivebyhitbox, quickstand, kickout)
guiCheckBoxSetSelected(aServerTab.QuickReload, quickreload)
guiCheckBoxSetSelected(aServerTab.FastMove, fastmove)
guiCheckBoxSetSelected(aServerTab.FastFire, fastfire)
Expand All @@ -474,6 +513,7 @@ addEventHandler("aClientRefresh", localPlayer, function(quickreload, fastmove, f
guiCheckBoxSetSelected(aServerTab.FastSprint, fastsprint)
guiCheckBoxSetSelected(aServerTab.BadDrivebyHitBox, baddrivebyhitbox)
guiCheckBoxSetSelected(aServerTab.QuickStand, quickstand)
guiCheckBoxSetSelected(aServerTab.KickoutOfVehicle_OnModelReplace, kickout)
end)

function getWeatherNameFromID(weather)
Expand Down
2 changes: 1 addition & 1 deletion [admin]/admin2/server/admin_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ addEventHandler(
"aServerGlitchRefresh",
root,
function()
triggerClientEvent("aClientRefresh", client, isGlitchEnabled("quickreload"), isGlitchEnabled("fastmove"), isGlitchEnabled("fastfire"), isGlitchEnabled("crouchbug"), isGlitchEnabled("highcloserangedamage"), isGlitchEnabled("hitanim"), isGlitchEnabled("fastsprint"), isGlitchEnabled("baddrivebyhitbox"), isGlitchEnabled("quickstand"))
triggerClientEvent("aClientRefresh", client, isGlitchEnabled("quickreload"), isGlitchEnabled("fastmove"), isGlitchEnabled("fastfire"), isGlitchEnabled("crouchbug"), isGlitchEnabled("highcloserangedamage"), isGlitchEnabled("hitanim"), isGlitchEnabled("fastsprint"), isGlitchEnabled("baddrivebyhitbox"), isGlitchEnabled("quickstand"), isGlitchEnabled("kickoutofvehicle_onmodelreplace:"))
end
)

Expand Down

0 comments on commit cb31d68

Please sign in to comment.