MegastoRM

Untitled

Apr 30th, 2013
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <fun>
  6.  
  7. #define PLUGIN "New Plug-In"
  8. #define VERSION "1.0"
  9. #define AUTHOR "author"
  10.  
  11. new maxplayers, gMsgWpnPick
  12.  
  13. public plugin_init() {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15.  
  16. gMsgWpnPick = get_user_msgid("WeapPickup")
  17. register_message(gMsgWpnPick, "msgCheckWeapon")
  18. maxplayers = get_maxplayers()
  19. // Add your code here...
  20. }
  21.  
  22. public msgCheckWeapon(msg_id, iDest, msg_ent)
  23. {
  24. if(!(1<=msg_ent<=maxplayers))
  25. return;
  26.  
  27. if(get_msg_arg_int(1) == 13 || get_msg_arg_int(1) == 18 || get_msg_arg_int(1) == 24)
  28. {
  29. set_task(0.1, "DropWeapon", msg_ent)
  30. }
  31. }
  32.  
  33. public DropWeapon(id)
  34. {
  35. new weapon = get_user_weapon(id)
  36. new szWepName[32]
  37. if(is_user_connected(id))
  38. {
  39. if(weapon == 13 || weapon == 18 || weapon == 24)
  40. {
  41. get_weaponname(weapon, szWepName, charsmax(szWepName))
  42. engclient_cmd(id, "drop", szWepName)
  43. give_item(id, "weapon_scout")
  44. give_item(id, "ammo_762nato")
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment