Franc1sco

Untitled

Sep 28th, 2014
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <csgo_items>
  2.  
  3.  
  4. public Action:Command_butterfly(client, args)
  5. {
  6. if(!IsPlayerAlive(client))
  7. PrintToChat(client, "[Knife] You can't buy this while you are dead.");
  8. else
  9. {
  10. new currentknife = GetPlayerWeaponSlot(client, 2);
  11. if(IsValidEntity(currentknife) && currentknife != INVALID_ENT_REFERENCE)
  12. {
  13. SetEntProp(currentknife, Prop_Send, "m_iItemDefinitionIndex", CSGO_GetItemDefinitionIndexByName("weapon_knife_butterfly"));
  14. PrintToChat(client, "[Knife] You received the Butterfly Knife!");
  15. }
  16. }
  17. return Plugin_Handled;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment