Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <csgo_items>
- public Action:Command_butterfly(client, args)
- {
- if(!IsPlayerAlive(client))
- PrintToChat(client, "[Knife] You can't buy this while you are dead.");
- else
- {
- new currentknife = GetPlayerWeaponSlot(client, 2);
- if(IsValidEntity(currentknife) && currentknife != INVALID_ENT_REFERENCE)
- {
- SetEntProp(currentknife, Prop_Send, "m_iItemDefinitionIndex", CSGO_GetItemDefinitionIndexByName("weapon_knife_butterfly"));
- PrintToChat(client, "[Knife] You received the Butterfly Knife!");
- }
- }
- return Plugin_Handled;
- }
Advertisement
Add Comment
Please, Sign In to add comment