Advertisement
Guest User

Untitled

a guest
Feb 14th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. datastream.Hook( "SendWeaponClass", function( ply, handler, id, encoded, decoded )
  2. print( "The client clicked on a weapon, give it to him" )
  3. print( "Printing incoming table" )
  4. print( decoded.class .. "This is the weapon to give" )
  5. print( decoded.model .. "Just for lulz" )
  6. print( decoded.name .. "Just for shitz n gigglez...or not" )
  7. print( "Now printing contents of ragObj.holster" )
  8. local ragObj = Entity( ply.LastUsedRagdoll )
  9. for k, v in pairs( ragObj.holster ) do
  10. print( zc_weapontables[v].class .. " This is the weapon to give" )
  11. print( zc_weapontables[v].name .. " Just for shitz n gigglez...or not" )
  12. print( zc_weapontables[v].model .. " Just for lulz" )
  13. end
  14. print( "Removing the weapon the client chose from the table" )
  15. if table.HasValue( ragObj.holster, decoded.class ) then
  16. print( "ragObj.holster has the value decoded.class" )
  17. if ragObj.holster[decoded.class] != nil then
  18. print("And its not nil")
  19. ply:Give( decoded.class )
  20. ply:PrintMessage( HUD_PRINTTALK, "You have scavenged a " .. decoded.name )
  21. ragObj.holster[decoded.class] = nil
  22. end
  23. else
  24. ply:PrintMessage( HUD_PRINTTALK, "Sorry, that weapon was taken" )
  25. end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement