Entity.GibBreakClient

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:GibBreakClient( Vector Velocity )
Description:
Running this function will cause gibs to be spawned clientside instead of serverside whenever the entity breaks. This is probably the best option in most cases, server-side gibs tend to pile up and lag the server.
Returns: nil
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.GibBreakClient]Entity.GibBreakClient [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGibs whatever *prop* you shoot at. Sends gibs flying in the direction you are aiming.
Used onNewerShared.png
Code
function SWEP:PrimaryAttack()
    tr = self.Owner:GetEyeTrace()
    if !tr.Hit then return end
    if !tr.Entity:IsValid() then return end
    tr.Entity:GibBreakClient(tr.Normal*100)
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox