-
Notifications
You must be signed in to change notification settings - Fork 36
Cheat Sheet
8Z edited this page Oct 10, 2023
·
4 revisions
A list of common things you may want to do with ArcCW and how to do them.
local wep = LocalPlayer():GetActiveWeapon()
print(wep.ArcCW == true)
if SERVER then
local ply = player.GetAll()[1]
ArcCW:PlayerGiveAtt(ply, "my_attachment", 1)
ArcCW:PlayerSendAttInv(ply) -- Networks attachment to client
end
local wep = LocalPlayer():GetActiveWeapon()
print(wep.Attachments[1].Installed) -- Attachment in first slot
if SERVER then
local wep = Entity(1):GetActiveWeapon()
wep.Attachments[1].Installed = "optic_reddot"
wep.Attachments[2].Installed = "muzz_compensator"
wep:NetworkWeapon() -- Update attachment info for all clients
end
For specifics, see this wiki page. Hooks must be in a shared realm!
-- Set Damage to 999 if user is admin
att.O_Hook_Override_Damage = function(wep, data)
if IsValid(wep:GetOwner()) and wep:GetOwner():IsPlayer() and wep:GetOwner():IsAdmin() then
return {current = 999}
end
end
ArcCW is made by a team of pretty good modders.
Contribute at https://github.com/HaodongMo/ArcCW