Advertisement
Guest User

Untitled

a guest
Aug 27th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. //Undroppable weapons
  2. //Two options, both will work slightly differently; use one only
  3. //Both solutions only affect non-superadmins; superadmins can still drop weapons normally
  4.  
  5. //Use this if you want weapons to be completely unremovable from inventory...
  6. package NoDropWeapons
  7. {
  8. function serverCmdDropTool(%client,%slot)
  9. {
  10. if(%client.isSuperAdmin)
  11. Parent::serverCmdDropTool(%client,%slot);
  12. }
  13. };
  14. ActivatePackage(NoDropWeapons);
  15.  
  16.  
  17.  
  18. //OR use this one if you still want people to be able to clear weapons from their inventory;
  19. //the weapon will just be completely deleted instead.
  20. package NoDropWeapons
  21. {
  22. function serverCmdDropTool(%client,%slot)
  23. {
  24. if(%client.isSuperAdmin)
  25. Parent::serverCmdDropTool(%client,%slot);
  26. else
  27. {
  28. %client.player.tool[%slot] = 0;
  29. messageClient(%client,'MsgItemPickup','',%slot,0,0);
  30. %client.player.unMountImage(0);
  31. }
  32. }
  33. };
  34. ActivatePackage(NoDropWeapons);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement