native
give_item
Syntax
native give_item(index, const item[]);
Description
Gives an item to a player.
Parameters
| index | Client index |
|---|---|
| item | Classname of the item to give. Should start with either "weapon_", "ammo_", "item_" or "tf_weapon_" |
Return
Item entity index. If an invalid item name is
given or the item failed to create, it will return 0.
If the item was removed, it will return -1
Error
If player is not connected or not within the range
of 1 to MaxClients or item creation fails.