Hello, you can use my
Item API, You have 2 choices if you do so.
If you want to give the player a knife you can choose to switch to the knife as soon as you give him it.
Example 1:
PHP Code:
CSGOItems_GiveWeapon(iClient, "weapon_knife", _, _, CS_SLOT_KNIFE)
Result 1: Client receives a knife and is automatically equipped, and active weapon is switched to knife. If he has any other knife equipped it will automatically remove it using a crash free method, Saving you a lot of messy code, you can use this 1 line to do everything.
Example 2:
PHP Code:
CSGOItems_SetActiveWeapon(iClient, iWeapon);
Result 2: The clients active weapon is instantly switched to the weapon index specified, this is a custom method which makes an SDKCall to the internal Weapon_Switch function and then forces the active weapon netprop.
Let me know how it works out for you!