So not even the documentation told me that LocalPlayer() doesn't even have GetWeapon.
parent
5aa438d6b1
commit
d6795521e6
|
@ -33,9 +33,9 @@ usermessage.Hook("disguiserShootFX", function(um)
|
||||||
local bFirstTimePredicted = um:ReadBool()
|
local bFirstTimePredicted = um:ReadBool()
|
||||||
|
|
||||||
// Player and weapon valid?
|
// Player and weapon valid?
|
||||||
if !IsValid(LocalPlayer()) || !IsValid(LocalPlayer():GetWeapon()) || !IsValid(LocalPlayer():GetWeapon().DoShootEffect) then return false end
|
if !IsValid(LocalPlayer()) || !IsValid(LocalPlayer():GetActiveWeapon()) || !IsValid(LocalPlayer():GetActiveWeapon().DoShootEffect) then return false end
|
||||||
|
|
||||||
// Render shoot effect
|
// Render shoot effect
|
||||||
LocalPlayer():GetWeapon("disguiser"):DoShootEffect(
|
LocalPlayer():GetActiveWeapon("disguiser"):DoShootEffect(
|
||||||
hitpos, hitnormal, entity, physbone, bFirstTimePredicted)
|
hitpos, hitnormal, entity, physbone, bFirstTimePredicted)
|
||||||
end)
|
end)
|
Loading…
Reference in New Issue