Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nclude("sv_items_table.lua")
- concommand.Add("gmodz_giveitem", function( ply, cmd, args )
- local hasValue = table.HasValue( gmodz_items, args[1] )
- local amount = 1
- local amountStr = tostring( 1 )
- if hasValue == true then
- if ply:IsUserGroup("owner") or ply:IsUserGroup("co_owner") or ply:IsUserGroup("manager") then
- ply:AddItem( args[1] )
- ply:ChatPrint( "You have given yourself an item! (" ..args[1].. ")" )
- gmodz_log( "logs_items_give", ply:Nick().." has just spawned x"..amountStr.." of "..args[1] )
- else
- ply:ChatPrint( "You do not have access to this command!" )
- end
- else
- ply:ChatPrint("That is not a valid item classname!")
- end
- end )
- concommand.Add("gmodz_giveitem_5", function( ply, cmd, args )
- local hasValue = table.HasValue( gmodz_items, args[1] )
- local amount = 5
- local amountStr = tostring( 5 )
- if hasValue == true then
- if ply:IsUserGroup("owner") or ply:IsUserGroup("co_owner") or ply:IsUserGroup("manager") then
- for i=1, amount do
- ply:AddItem( args[1] )
- end
- ply:ChatPrint( "You have given yourself an item! (" ..args[1].. ") x" ..amountStr )
- gmodz_log( "logs_items_give", ply:Nick().." has just spawned x"..amountStr.." of "..args[1] )
- else
- ply:ChatPrint( "You do not have access to this command!" )
- end
- else
- ply:ChatPrint("That is not a valid item classname!")
- end
- end )
- concommand.Add("gmodz_giveitem_10", function( ply, cmd, args )
- local hasValue = table.HasValue( gmodz_items, args[1] )
- local amount = 10
- local amountStr = tostring( 10 )
- if hasValue == true then
- if ply:IsUserGroup("owner") or ply:IsUserGroup("co_owner") or ply:IsUserGroup("manager") then
- for i=1, amount do
- ply:AddItem( args[1] )
- end
- ply:ChatPrint( "You have given yourself an item! (" ..args[1].. ") x" ..amountStr )
- gmodz_log( "logs_items_give", ply:Nick().." has just spawned x"..amountStr.." of "..args[1] )
- else
- ply:ChatPrint( "You do not have access to this command!" )
- end
- else
- ply:ChatPrint("That is not a valid item classname!")
- end
- end )
- concommand.Add("gmodz_giveitem_20", function( ply, cmd, args )
- local hasValue = table.HasValue( gmodz_items, args[1] )
- local amount = 20
- local amountStr = tostring( 20 )
- if hasValue == true then
- if ply:IsUserGroup("owner") or ply:IsUserGroup("co_owner") or ply:IsUserGroup("manager") then
- for i=1, amount do
- ply:AddItem( args[1] )
- end
- ply:ChatPrint( "You have given yourself an item! (" ..args[1].. ") x" ..amountStr )
- gmodz_log( "logs_items_give", ply:Nick().." has just spawned x"..amountStr.." of "..args[1] )
- else
- ply:ChatPrint( "You do not have access to this command!" )
- end
- else
- ply:ChatPrint("That is not a valid item classname!")
- end
- end )
- concommand.Add("gmodz_giveitem_50", function( ply, cmd, args )
- local hasValue = table.HasValue( gmodz_items, args[1] )
- local amount = 50
- local amountStr = tostring( 50 )
- if hasValue == true then
- if ply:IsUserGroup("owner") or ply:IsUserGroup("co_owner") or ply:IsUserGroup("manager") then
- for i=1, amount do
- ply:AddItem( args[1] )
- end
- ply:ChatPrint( "You have given yourself an item! (" ..args[1].. ") x" ..amountStr )
- gmodz_log( "logs_items_give", ply:Nick().." has just spawned x"..amountStr.." of "..args[1] )
- else
- ply:ChatPrint( "You do not have access to this command!" )
- end
- else
- ply:ChatPrint("That is not a valid item classname!")
- end
- end )
- concommand.Add("gmodz_giveitem_100", function( ply, cmd, args )
- local hasValue = table.HasValue( gmodz_items, args[1] )
- local amount = 100
- local amountStr = tostring( 100 )
- if hasValue == true then
- if ply:IsUserGroup("owner") or ply:IsUserGroup("co_owner") or ply:IsUserGroup("manager") then
- for i=1, amount do
- ply:AddItem( args[1] )
- end
- ply:ChatPrint( "You have given yourself an item! (" ..args[1].. ") x" ..amountStr )
- gmodz_log( "logs_items_give", ply:Nick().." has just spawned x"..amountStr.." of "..args[1] )
- else
- ply:ChatPrint( "You do not have access to this command!" )
- end
- else
- ply:ChatPrint("That is not a valid item classname!")
- end
- end )
- concommand.Add("gmodz_giveitem_1k", function( ply, cmd, args )
- local hasValue = table.HasValue( gmodz_items, args[1] )
- local amount = 1000
- local amountStr = tostring( 1000 )
- if hasValue == true then
- if ply:IsUserGroup("owner") or ply:IsUserGroup("co_owner") or ply:IsUserGroup("manager") then
- for i=1, amount do
- ply:AddItem( args[1] )
- end
- ply:ChatPrint( "You have given yourself an item! (" ..args[1].. ") x" ..amountStr )
- gmodz_log( "logs_items_give", ply:Nick().." has just spawned x"..amountStr.." of "..args[1] )
- else
- ply:ChatPrint( "You do not have access to this command!" )
- end
- else
- ply:ChatPrint("That is not a valid item classname!")
- end
- end )
- concommand.Add("gmodz_giveitem_10k", function( ply, cmd, args )
- local hasValue = table.HasValue( gmodz_items, args[1] )
- local amount = 10000
- local amountStr = tostring( 10000 )
- if hasValue == true then
- if ply:IsUserGroup("owner") or ply:IsUserGroup("co_owner") or ply:IsUserGroup("manager") then
- for i=1, amount do
- ply:AddItem( args[1] )
- end
- ply:ChatPrint( "You have given yourself an item! (" ..args[1].. ") x" ..amountStr )
- gmodz_log( "logs_items_give", ply:Nick().." has just spawned x"..amountStr.." of "..args[1] )
- else
- ply:ChatPrint( "You do not have access to this command!" )
- end
- else
- ply:ChatPrint("That is not a valid item classname!")
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement