#Deleting Darkrp weapons
1 messages · Page 1 of 1 (latest)
it might be because you are an admin. what job is it for?
Well i have more ulx commands including !tools. If I do this command im getting my Physics gun and stuff. But sadly the Batons are for everyone
you are being given arrest / unarrest because you are admin in ULX / fadmin
there is probably a way to do this in ULX but i cbf looking at ulx again.
-- Define a function to remove the arrest baton from admin/superadmin players who are not police
local function RemoveArrestBaton(ply)
-- Check if the svar is set to remove the arrest baton
if GetConVar("admin_remove_arrest_baton"):GetInt() == 1 then
-- Check if the player has the arrest baton or unarrest baton and is an admin/superadmin
if ply:HasWeapon("arrest_stick") or ply:HasWeapon("unarrest_stick") then
if ply:IsAdmin() or ply:IsSuperAdmin() then
-- Check if the player is not a member of the DarkRP police team
if not ply:Team() == TEAM_POLICE or not ply:Team() == TEAM_CHIEF then
-- Remove the weapon from the player's inventory
ply:StripWeapon("arrest_stick")
ply:StripWeapon("unarrest_stick")
end
end
end
end
end
-- Hook into the OnPlayerSpawn event
hook.Add("PlayerSpawn", "RemoveArrestBaton", RemoveArrestBaton)
-- Add an svar to toggle the removal of the arrest baton
CreateConVar("admin_remove_arrest_baton", "0", FCVAR_ARCHIVE + FCVAR_NOTIFY, "Set to 1 to remove the arrest baton from admin/superadmin players who are not police")```
you can add this to autorun at the bottom
basically if you type admin_remove_arrest_baton 1 in console, it will remove the batons from you as you spawn
or you can add it to /lua/autorun/<create a new file named arrestbatonremove.lua>
why you would want to do this i have no idea but be my guest