[ create a new paste ] login | about

Link: http://codepad.org/lDX6Azov    [ raw code | output | fork ]

Lua, pasted on Apr 16:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
AddCSLuaFile("cl_loadoutaddon.lua")
AddCSLuaFile("autorun/shared_loadoutaddon.lua")
include("autorun/shared_loadoutaddon.lua")
require("datastream")

function ShowMenuF1(ply)
	ply:ConCommand("OpenLoadoutMenu")
	return false
end
hook.Add("ShowHelp", "ShowMenuF1", ShowMenuF1)

-- Console Command to unlock a weapon for a player
-- argument one is the players name and argument two is the weapon's name
local function GivePlayerIndividualWeapon(ply, cmd, args)
	playerfound = false
	if not ply:IsAdmin() or not ply:IsSuperAdmin() and not args[1] and not args[2] and not RealWeapons[args[2]] then return end
		for k,v in pairs(player.GetAll()) do
			if string.find(string.lower(v:Nick()), string.lower(args[1])) then
				playerfound = true
				v.StringOfWeapons = v.StringOfWeapons .. "END" .. args[2]
				v:SetPData("UnlockedWeapons", v.StringOfWeapons)
				OnePlayersInfo = {}
				OnePlayersInfo[v:Nick()] = {v.Group, v.StringOfWeapons}
				datastream.StreamToClients(player.GetAllAdmins(), "OneClientsData", OnePlayersInfo)
				ply:ChatPrint("You have given player: " .. v:Nick() .. " weapon: " .. args[2])
				timer.Simple(10, function()
					SendUserMessage("UnlockedWeaponsToClient", v, v.StringOfWeapons)
				end)
				v.UnlockedWeapons = string.Explode("END", v.StringOfWeapons)
			end
		end
		if not playerfound then ply:ChatPrint("No player was found by the name of" .. args[1]) end
	end
concommand.Add("GivePlayerWeapon", GivePlayerIndividualWeapon)


local function PlayerGroupCollect(ply)
	ply.Group = ply:GetPData("Group")
	if not ply.Group then 
		ply.Group = "Guest" 
		ply:SetPData("Group", "Guest") 
	end
	GetPlayersIndividualWeapons(ply)
	SendUserMessage("ClientLoadoutGroup", ply, ply.Group)
	timer.Simple(3, function()
		SendUserMessage("OpenLoadoutMenu", ply)
	end)
	ply:ChatPrint("Welcome" .. ply:Nick() or ply:Name() .. ", of usergroup" .. ply.Group ".")
end
hook.Add("PlayerInitialSpawn", "PlayerGroupCollect", PlayerGroupCollect)

function AdminCheckCL(ply)
	if ply:IsAdmin() or ply:IsSuperAdmin() then
		SendUserMessage("YouAreAnAdmin", ply)
		AllPlayersInfo = {}
		for k,v in pairs(player.GetAll()) do
			AllPlayersInfo[v:Nick()] = {v.Group, v.StringOfWeapons}
		end
		datastream.StreamToClients(ply, "AllClientsData", AllPlayersInfo)
	end
		OnePlayersInfo = {}
		OnePlayersInfo[ply:Nick()] = {ply.Group, ply.StringOfWeapons}
		datastream.StreamToClients(player.GetAllAdmins(), "OneClientsData", OnePlayersInfo)
end
hook.Add("PlayerInitialSpawn", "AdminCheckCL", AdminCheckCL)
concommand.Add("ResendAllPlayerStats", AdminCheckCL)

function Testinglll(ply)
	ply:ConCommand("ResendAllPlayerStats")
end
hook.Add("PlayerInitialSpawn", "Testinglll", Testinglll)

function GetPlayersIndividualWeapons(ply)
	ply.StringOfWeapons = ply:GetPData("UnlockedWeapons")
	if not ply.StringOfWeapons then ply.StringOfWeapons = 0
		return 
		else SendUserMessage("UnlockedWeaponsToClient", ply, StringOfWeapons)
		ply.UnlockedWeapons = string.Explode("END", ply.StringOfWeapons)
	end
end

local function PlayerEquipWeapon(ply, cmd, args)
	if table.HasValue( weapons[ply.Group] , args[1]) or table.HasValue(ply.UnlockedWeapons, args[1]) then
		if MaxWeapons[ply.Group] <= #ply.WeaponsChosen 
			then ply:ChatPrint("You have met your limit of weapons selected. Unequip other weapons and try again. Your limit is" .. MaxWeapons[ply.Group]) return 
		end
		if not ply.WeaponsChosen then 
			ply.WeaponsChosen = {args[1]}
			else
			table.insert(ply.WeaponsChosen, args[1])
		end
	end
end
concommand.Add("EquipWeapon", PlayerEquipWeapon)

local function PlayerUnequipWeapon(ply, cmd, args)
	if table.HasValue(ply.WeaponsChosen, args[1]) then
		for k,v in pairs(WeaponsChosen) do
			if v == args[1] then
				table.remove(WeaponsChosen, i)
			end
		end
	end
end
concommand.Add("UnequipWeapon", PlayerUnequipWeapon)

local function GivePlayerEffects(ply)
	ply.GivenWeapons = 0
	if not ply.WeaponsChosen then
		for k,v in pairs(Weapons[ply.Group]) do
			if ply.GivenWeapons >= MaxWeapons[ply.Group] then break end
			ply:Give(RealWeapons[v])
			ply.GivenWeapons = ply.GivenWeapons + 1
		end
		else
		for k,v in pairs(ply.WeaponsChosen) do
			ply:Give(RealWeapons[v])
		end
	end
	ply:SetHealth(Health[ply.Group])
	ply:SetHealth(Health[ply.Group])
	ply:SetArmor(Armor[ply.Group])
	ply:SetWalkSpeed(WalkSpeed[ply.Group])
	ply:SetRunSpeed(RunSpeed[ply.Group])
end
hook.Add("PlayerLoadout", "GivePlayerEffects", GivePlayerEffects)


local function ChangePlayerGroup(ply, cmd, args)
	if ply:IsAdmin() or ply:IsSuperAdmin() and args[1] and args[2] then
		if table.HasValue(PlayerLoadoutGroups, args[2]) then
			for k,v in pairs(player.GetAll()) do
				if string.find(string.lower(v:Nick()), string.lower(args[1])) then
					local playerfound = true
					v:SetPData("Group", args[2])
					v.Group = args[2]
					SendUserMessage("ClientLoadoutGroup", v, v.Group)
					OnePlayersInfo = {}
					OnePlayersInfo[v:Nick()] = {v.Group, v.StringOfWeapons}
					datastream.StreamToClients(player.GetAllAdmins(), "OneClientsData", OnePlayersInfo)
				end
			end
			else playerfound = true ply:ChatPrint("There is no group of the name" .. args[2] .. ". For a list of groups type \"groupnames\" in console") 
		end
	    if not playerfound then ply:ChatPrint("No player was found by the name of" .. args[1]) end
	end
end
concommand.Add("ChangePlayerGroup", ChangePlayerGroup)

function player.GetAllAdmins()
	local admins = {}
	for k,v in pairs(player.GetAll()) do
		if v:IsAdmin() then
			table.insert(admins, v)
		end
	end
	return admins
end

-- lua_openscript autorun/server/server_loadoutaddon.lua

include( "autorun/shared_loadoutaddon.lua" )
require("datastream")

UnlockedWeapons = {}
EquippedWeapons = {}
ClientsInfo = {}

function LoadoutMenu()
-- Making frame
	panelopened = true
	
	DermaPanel = vgui.Create( "DFrame" ) 
	DermaPanel:SetPos( 65,50 )
	DermaPanel:SetSize( 360, 353 )
	DermaPanel:SetTitle( "PlayerLoadout" )
	DermaPanel:SetVisible( true )
	DermaPanel:SetDraggable( true )
	DermaPanel:ShowCloseButton( true )
	DermaPanel:MakePopup()
	
-- Making Property Sheet to organise tabs with

	local PropertySheet = vgui.Create( "DPropertySheet", DermaPanel )
	PropertySheet:SetPos( 5, 30 )
	PropertySheet:SetSize( 340, 315 )
	
-- Making a text label to explain to the user and also so that it can be added to the property sheet and things can be parented to it. Organisation.
	
	local TheseAreYourUnlockedWeapons = vgui.Create("DLabel")

	local Text = vgui.Create("DLabel", TheseAreYourUnlockedWeapons)
	Text:SetText("There are your unlocked weapons")
	Text:SizeToContents()
	Text:SetPos(0,5)
	Text:SetTextColor(Color(0,0,0,255))
	
-- Making a list of all of the player's unlocked weapons.
	
	local YourUnlockedWeaponsBox = vgui.Create("DComboBox", TheseAreYourUnlockedWeapons)
	YourUnlockedWeaponsBox:SetPos(0, 30)
	YourUnlockedWeaponsBox:SetSize(100, 200)
	
-- Looping through the player's group given weapons and adding them to the DComboBox
	
	for k,v in pairs(Weapons[MyGroup]) do
		YourUnlockedWeaponsBox:AddItem(v)
	end
	
-- Looping through the player's specific weapons and adding them to the list.

	for k,v in pairs(UnlockedWeapons) do
		YourUnlockedWeaponsBox:AddItem(v)
	end

-- Create a DComboBox to keep your equipped weapons on
	
	local EquippedWeaponsBox = vgui.Create("DComboBox", TheseAreYourUnlockedWeapons)
	EquippedWeaponsBox:SetPos(200, 30)
	EquippedWeaponsBox:SetSize(100,200)
	
-- Add the equipped weapons to the box
	
	for k,v in pairs(EquippedWeapons) do
		EquippedWeaponsBox:AddItem(v)
	end
	
-- Make a button to equip a weapon

	local EquipWeaponButton = vgui.Create("DButton", TheseAreYourUnlockedWeapons)
	EquipWeaponButton:SetSize(130, 30)
	EquipWeaponButton:SetPos(0, 230)
	EquipWeaponButton:SetText("Equip selected weapon")
	EquipWeaponButton.DoClick =	function()
		if not YourUnlockedWeaponsBox:GetSelectedItems() and YourUnlockedWeaponsBox:GetSelectedItems()[1] then
			return end
		local weaponname = YourUnlockedWeaponsBox:GetSelectedItems()[1]:GetValue()
		if not table.HasValue(EquippedWeapons, weaponname) then
			RunConsoleCommand("UnequipWeapon", weaponname)
			table.insert(EquippedWeapons, weaponname)
			EquippedWeaponsBox:Clear()
			for k,v in pairs(EquippedWeapons) do
				EquippedWeaponsBox:AddItem(v)
			end 
		end
	end

-- Make a button to unequip a weapon

	local UnequipWeaponButton = vgui.Create("DButton", TheseAreYourUnlockedWeapons)
	UnequipWeaponButton:SetSize(150, 30)
	UnequipWeaponButton:SetPos(180, 230)
	UnequipWeaponButton:SetText("Unequip selected weapon")
	UnequipWeaponButton.DoClick =	function()
		if not EquippedWeaponsBox:GetSelectedItems() and EquippedWeaponsBox:GetSelectedItems()[1] then
			return end
				local weaponname = EquippedWeaponsBox:GetSelectedItems()[1]:GetValue()
				if table.HasValue(EquippedWeapons, weaponname) then
					RunConsoleCommand("UnequipWeapon", weaponname)
					for k,v in pairs(EquippedWeapons) do
						if v == weaponname then
							table.remove(EquippedWeapons, i)
						end
					end
					-- Reloading equipped weapons box
					EquippedWeaponsBox:Clear()
					for k,v in pairs(EquippedWeapons) do
						EquippedWeaponsBox:AddItem(v)
					end
		end
	end
	
	PropertySheet:AddSheet( "Your weapons", TheseAreYourUnlockedWeapons, "gui/silkicons/wrench", false, false, "Your weapons and loadout" )
	
	
-- Admin panel things. Only done if the client is an admin.
	
	if meadmin then
	
		PlayersTextAMN = vgui.Create("DLabel")
		
	    PlayersTextAMN2 = vgui.Create("DLabel", PlayersTextAMN)
		PlayersTextAMN2:SetText("Players List:")
		PlayersTextAMN2:SizeToContents()
		PlayersTextAMN2:SetTextColor( Color ( 0, 0, 0, 255) )
		
		-- Text labels
		
		PlayerGroupText = vgui.Create("DLabel", PlayersTextAMN)
		PlayerGroupText:SetPos(0, 230)
		PlayerGroupText:SetTextColor( Color ( 0, 0, 0, 255) )
		PlayerGroupText:SetText("No player selected.")
		PlayerGroupText:SizeToContents()
		
		PlayersGunsText = vgui.Create("DLabel", PlayersTextAMN)
		PlayersGunsText:SetPos(110,0)
		PlayersGunsText:SetTextColor( Color ( 0, 0, 0, 255) )
		PlayersGunsText:SetText("The Player's \ncurrent weapons.")
		PlayersGunsText:SizeToContents()
		
-- Players in game list
		
		PlayerBoxListAMN = vgui.Create("DComboBox", PlayersTextAMN)
		PlayerBoxListAMN:SetSize(100, 200)
		PlayerBoxListAMN:SetPos(0, 30)
		PlayerBoxListAMN:EnableVerticalScrollbar( true )
		
-- Adds every player to the list

		for k,v in pairs(player.GetAll()) do
			PlayerBoxListAMN:AddItem(v:Nick() or v:Name())
		end
					
-- Player's weapon list
					
		PlayerBoxCurrentWeaponsListAMN = vgui.Create("DComboBox", PlayersTextAMN)
		PlayerBoxCurrentWeaponsListAMN:SetSize(100, 200)
		PlayerBoxCurrentWeaponsListAMN:SetPos(110, 30)
		PlayerBoxCurrentWeaponsListAMN:EnableVerticalScrollbar( true )
		
-- Add to player's weapon list
	
		PlayerBoxAvailableWeaponsListAMN = vgui.Create("DComboBox", PlayersTextAMN)
		PlayerBoxAvailableWeaponsListAMN:SetSize(100, 200)
		PlayerBoxAvailableWeaponsListAMN:SetPos(220, 30)
		PlayerBoxAvailableWeaponsListAMN:EnableVerticalScrollbar( true )
		
		for k,v in pairs(RealWeapons) do
			PlayerBoxAvailableWeaponsListAMN:AddItem(k)
		end
		
-- Button to give players weapons

		GiveWeaponButtonAMN = vgui.Create("DButton", PlayersTextAMN)
		GiveWeaponButtonAMN:SetPos(220,240)
		GiveWeaponButtonAMN:SetSize(100, 50)
		GiveWeaponButtonAMN:SetText("Give Weapon")
		GiveWeaponButtonAMN.DoClick = function()
			if PlayerBoxListAMN:GetSelectedItems()[1] and PlayerBoxAvailableWeaponsListAMN:GetSelectedItems()[1] then
				RunConsoleCommand("GivePlayerWeapon", PlayerBoxListAMN:GetSelectedItems()[1]:GetValue(), PlayerBoxAvailableWeaponsListAMN:GetSelectedItems()[1]:GetValue())
		end end
		
-- Add the admin sheet to the propertysheet
		
		PropertySheet:AddSheet( "Admin settings", PlayersTextAMN, "gui/silkicons/wrench", false, false, "If you are an admin you can do admin things" )
	
	end
end
usermessage.Hook("OpenLoadoutMenu", LoadoutMenu)
concommand.Add("OpenLoadoutMenu", LoadoutMenu)

oldstuff = 0

function WeaponsAvaliableListResync(plyname)
	if oldstuff == ClientsData[plyname][2] then return end
	if ClientsData[plyname][2] == 0 then 
		local oldstuff = ClientsData[plyname][2]
		PlayerBoxAvailableWeaponsListAMN:Clear()
		for k,v in pairs(RealWeapons) do
			PlayerBoxAvailableWeaponsListAMN:AddItem(k)
		end
		else PlayerBoxAvailableWeaponsListAMN:Clear()
		for k,v in pairs(RealWeapons) do
			if not table.HasValue(ClientsData[plyname][3], k) then
				PlayerBoxAvailableWeaponsListAMN:AddItem(k)
			end
		end
	end
end

function ForceTextChange()
	-- if not panelopened then return end
	if not meadmin then return end
	if not PlayerBoxListAMN then return end
	if PlayerBoxListAMN:IsVisible() then
		if PlayerBoxListAMN:GetSelectedItems() and PlayerBoxListAMN:GetSelectedItems()[1] then
			local plyname = PlayerBoxListAMN:GetSelectedItems()[1]:GetValue()
			PlayerGroupText:SetText( plyname .. "'s\ngroup is: " .. ClientsData[plyname][1] )
			PlayerGroupText:SizeToContents()
			PlayersGunsText:SetText( plyname .. "'s\nweapons")
			PlayersGunsText:SizeToContents()
			WeaponsAvaliableListResync(plyname)
			if ClientsData[plyname][2] == 0 then return end
			if lastrefresh == ClientsData[plyname][2] then return end
			lastrefresh = ClientsData[plyname][2]
			PlayerBoxCurrentWeaponsListAMN:Refresh()
			for k,v in pairs(ClientsData[plyname][2]) do
				PlayerBoxCurrentWeaponsListAMN:AddItem(v)
			end
		end
	end
end
hook.Add("Think", "ForceTextChange", ForceTextChange)

function ReceiveUnlockedWeapons(um)
	UnlockedWeapons = string.Explode("END", um:ReadString())
	for k,v in pairs(UnlockedWeapons) do
		table.insert(UnlockedWeapons, v)
	end
end
usermessage.Hook("UnlockedWeaponsToClient", ReceiveUnlockedWeapons)

function ReceiveLoadoutGroup(um)
	MyGroup = um:ReadString()
end
usermessage.Hook("ClientLoadoutGroup", ReceiveLoadoutGroup)

function PrintGroupNames(ply, cmd, args)
	for k,v in pairs(PlayerLoadoutGroups) do
		Msg(v .. "                                  ")
	end
end
concommand.Add("groupnames", PrintGroupNames)

function MyLoadoutGroup(ply, cmd, args)
	Msg("You're loadout group is currently set to : " .. MyGroup)
end
concommand.Add("myloadoutgroup", MyLoadoutGroup)

function AdminCheckCL(um)
	meadmin = true
end
usermessage.Hook("YouAreAnAdmin", AdminCheckCL)


-- When you first spawn you are sent all player data

function AllPlayersInfoReceiveADM(handler, id, encoded, decoded)
	ClientsData = decoded
	for k,v in pairs(ClientsData) do
		ClientsData[k][3] = string.Explode("END", ClientsData[k][2])
		PrintTable(ClientsData[k][3])
	end
end
datastream.Hook("AllClientsData", AllPlayersInfoReceiveADM)

-- When someone else first spawns you are sent their data

function OnePlayersInfoReceiveADM(handler, id, encoded, decoded)
	for k,v in pairs(decoded) do
		ClientsData[k] = v
	end
end
datastream.Hook("OneClientsData", PlayersInfoReceiveADM)

-- lua_openscript_cl autorun/client/cl_loadoutaddon.lua

-- To add a group add it to this list and then fill in the following sections below, like weapons, armor etc, with the new group name.

PlayerLoadoutGroups = {"Guest", "Member", "Respected", "Donator", "Admin", "Super Admin"}

-- To add weapons copy this example and fill it in, removing the --

-- RealWeapons["Weapon name that you want people to see it as"] = "folder name for the weapon"
RealWeapons = {}
RealWeapons["shotgun"] = "weapon_shotgun"
RealWeapons["crowbar"] = "weapon_crowbar"
RealWeapons["slam"] = "weapon_slam"
RealWeapons["stun stick"] = "weapon_stunstick"
RealWeapons["Physics gun"] = "weapon_physcannon"
RealWeapons["357"] = "weapon_357"
RealWeapons["ar2"] = "weapon_ar2"
RealWeapons["crossbow"] = "weapon_crossbow"

MaxWeapons = {}
MaxWeapons["Guest"] = 1
MaxWeapons["Member"] = 2
MaxWeapons["Respected"] = 3
MaxWeapons["Donator"] = 5
MaxWeapons["Admin"] = 5
MaxWeapons["SuperAdmin"] = 5

-- You can change which groups spawn with which weapons by adding to the lists here.

Weapons = {}
Weapons["Guest"] = {"shotgun", "crowbar", "slam"}
Weapons["Member"] = {"shotgun", "crowbar", "slam", "stun stick"}
Weapons["Respected"] = {"shotgun", "crowbar", "slam", "stun stick", "physcannon"}
Weapons["Donator"] = {"shotgun", "crowbar", "slam", "stun stick", "physcannon", "357", "ar2", "crossbow"}
Weapons["Admin"] = {"shotgun", "crowbar", "slam"}
Weapons["SuperAdmin"] = {"shotgun", "crowbar", "slam", "stun stick"}

-- The rest are straightforward to change, just change the numbers with hte corresponding group.

Health = {}
Health["Guest"] = 100
Health["Member"] = 100
Health["Respected"] = 100
Health["Donator"] = 100
Health["Admin"] = 100
Health["SuperAdmin"] = 101

Armor = {}
Armor["Guest"] = 0
Armor["Member"] = 0
Armor["Respected"] = 0
Armor["Donator"] = 50
Armor["Admin"] = 50
Armor["SuperAdmin"] = 50


WalkSpeed = {}
WalkSpeed["Guest"] = 250
WalkSpeed["Member"] = 250
WalkSpeed["Respected"] = 250
WalkSpeed["Donator"] = 300
WalkSpeed["Admin"] = 300
WalkSpeed["SuperAdmin"] = 300


RunSpeed = {}
RunSpeed["Guest"] = 500
RunSpeed["Member"] = 500
RunSpeed["Respected"] = 500
RunSpeed["Donator"] = 600
RunSpeed["Admin"] = 600
RunSpeed["SuperAdmin"] = 600

-- I kept this as it might be needed in the future. 

--[[
Weapons = {}
Weapons["Guest"] = {"weapon_shotgun", "weapon_crowbar", "weapon_slam"}
Weapons["Member"] = {"weapon_shotgun", "weapon_crowbar", "weapon_slam", "weapon_stunstick"}
Weapons["Respected"] = {"weapon_shotgun", "weapon_crowbar", "weapon_slam", "weapon_stunstick", "weapon_physcannon"}
Weapons["Donator"] = {"weapon_shotgun", "weapon_crowbar", "weapon_slam", "weapon_stunstick", "weapon_physcannon", "weapon_357", "weapon_ar2", "weapon_crossbow"}
Weapons["Admin"] = {"weapon_shotgun", "weapon_crowbar", "weapon_slam"}
Weapons["SuperAdmin"] = {"weapon_shotgun", "weapon_crowbar", "weapon_slam", "weapon_stunstick"}
--]]


-- lua_openscript autorun/shared_loadoutaddon.lua
-- lua_openscript_cl autorun/shared_loadoutaddon.lua


Output:
1
2
3
4
line 1: attempt to call global 'AddCSLuaFile' (a nil value)
stack traceback:
	t.lua:1: in main chunk
	[C]: ?


Create a new paste based on this one


Comments: