GivePlayerItem Function

Gives a named item to a player.

int GivePlayerItem(int client, const char[] item, int iSubType)

Parameters

int client

Client index.

const char[] item

Item classname (such as weapon_ak47).

int iSubType

Unknown.

Return Value

Entity index on success, or -1 on failure.

Errors

Invalid client or client not in game, or lack of mod support.