AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity from weapon (https://forums.alliedmods.net/showthread.php?t=207990)

OvidiuS 02-08-2013 20:22

Entity from weapon
 
I'm planning to give weapon to user, but i also need to get that entity.
Something like:
Code:
give_item( id, "weapon_m4a1" ); // Now i need entity from given weapon.
I know that i can use find_ent_by_owner( -1, "weapon_m4a1", id ), but is there any better way?

hleV 02-08-2013 20:25

Re: Entity from weapon
 
Code:
new ent = give_item( id, "weapon_m4a1" );

OvidiuS 02-08-2013 20:40

Re: Entity from weapon
 
Thank you ;)


All times are GMT -4. The time now is 20:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.