Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- datastream.Hook( "SendWeaponClass", function( ply, handler, id, encoded, decoded )
- print( "The client clicked on a weapon, give it to him" )
- print( "Printing incoming table" )
- print( decoded.class .. "This is the weapon to give" )
- print( decoded.model .. "Just for lulz" )
- print( decoded.name .. "Just for shitz n gigglez...or not" )
- print( "Now printing contents of ragObj.holster" )
- local ragObj = Entity( ply.LastUsedRagdoll )
- for k, v in pairs( ragObj.holster ) do
- print( zc_weapontables[v].class .. " This is the weapon to give" )
- print( zc_weapontables[v].name .. " Just for shitz n gigglez...or not" )
- print( zc_weapontables[v].model .. " Just for lulz" )
- end
- print( "Removing the weapon the client chose from the table" )
- if table.HasValue( ragObj.holster, decoded.class ) then
- print( "ragObj.holster has the value decoded.class" )
- if ragObj.holster[decoded.class] != nil then
- print("And its not nil")
- ply:Give( decoded.class )
- ply:PrintMessage( HUD_PRINTTALK, "You have scavenged a " .. decoded.name )
- ragObj.holster[decoded.class] = nil
- end
- else
- ply:PrintMessage( HUD_PRINTTALK, "Sorry, that weapon was taken" )
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement