• Pick up entity with 'E'
    4 replies, posted
So you can pick up props using the E key, But it does not seem to work with entities (I Presume becuase E is use). So my question is , is there anyway to pick up an entity with E or would I need to write my own pickup function? Thanks.
[URL]http://wiki.garrysmod.com/page/GM/AllowPlayerPickup[/URL] [URL]http://wiki.garrysmod.com/page/GM/PlayerCanPickupItem[/URL] One of these allows you to hold the item. [editline]31st May 2016[/editline] [URL]http://wiki.garrysmod.com/page/Player/PickupObject[/URL] "[B]Note:[/B] Don't get this confused with picking up items like ammo or health kits.[B]Note:[/B] This picks up the passed entity regardless of its mass or distance from the player."
[QUOTE=Netheous;50429834][URL]http://wiki.garrysmod.com/page/GM/AllowPlayerPickup[/URL] [URL]http://wiki.garrysmod.com/page/GM/PlayerCanPickupItem[/URL] One of these allows you to hold the item. [editline]31st May 2016[/editline] [URL]http://wiki.garrysmod.com/page/Player/PickupObject[/URL] "[B]Note:[/B] Don't get this confused with picking up items like ammo or health kits.[B]Note:[/B] This picks up the passed entity regardless of its mass or distance from the player."[/QUOTE] Neither of them work, As them hooks are not called when you press 'e' on an entity, Only props etc.
[QUOTE=0V3RR1D3;50430050]Neither of them work, As them hooks are not called when you press 'e' on an entity, Only props etc.[/QUOTE] PickupObject is not a hook, it's a function.
[QUOTE=Netheous;50430223]PickupObject is not a hook, it's a function.[/QUOTE] Completely missed that, My bad. Will try now. [editline]31st May 2016[/editline] Yep that worked, Thanks man.
Sorry, you need to Log In to post a reply to this thread.