drop ulx-custom-commands and start using my own custom ulx modules

This commit is contained in:
edshot99 2024-11-29 02:59:04 -06:00
parent f5a50af87f
commit d9c9923a7d
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,20 @@
function ulx.resetscore(calling_ply)
calling_ply:SetFrags(0)
calling_ply:SetDeaths(0)
ulx.tsay(calling_ply, string.format("[RS] Player '%s' reset their score!", calling_ply:Nick()))
end
local resetscore = ulx.command("Fun", "ulx resetscore", ulx.resetscore, {"!rs","!resetscore"})
resetscore:defaultAccess(ULib.ACCESS_ALL)
resetscore:help("Reset your kills and deaths.")
function ulx.resetscores(calling_ply)
for _, ply in ipairs(player.GetAll()) do
ply:SetFrags(0)
ply:SetDeaths(0)
end
ulx.tsay(calling_ply, string.format("[RS] Admin '%s' reset all scores!", calling_ply:Nick()))
end
local resetscores = ulx.command("Fun", "ulx resetscores", ulx.resetscores, {"!rss","!resetscores"})
resetscores:defaultAccess(ULib.ACCESS_ADMIN)
resetscores:help("Reset all kills and deaths.")

View File

@ -0,0 +1,17 @@
local DISCORD_URL = ""
local COLLECTION_URL = ""
function ulx.discord(calling_ply)
gui.OpenURL(DISCORD_URL)
end
local discord = ulx.command("Utility", "ulx discord", ulx.discord, {"!disc", "!discord"})
discord:defaultAccess(ULib.ACCESS_ALL)
discord:help("View Discord invite.")
function ulx.collection(calling_ply)
gui.OpenURL(COLLECTION_URL)
end
local collection = ulx.command("Utility", "ulx collection", ulx.collection, "!collection")
collection:defaultAccess(ULib.ACCESS_ALL)
collection:help("View server collection information.")