Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing glitches and world properties #443

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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