1
!set weapon [ID] [WEAPON]
Goes a gun to the ID selected
Example :
!set weapon <ID OF PLAYER> <WEAPON>
!set weapon 1 45
msg2(id,"You Have a new weapon!")
help?
!set weapon [ID] [WEAPON]
function totable(t, match) 	local cmd = {} 	if not match then match = "[^%s]+" end 		for word in string.gmatch(t, match) do 			table.insert(cmd, word) 		end 	return cmd end addhook('say', 'giveweapon') function giveweapon(id, msg) 	local a = totable(msg) 	if a[1] == '!set' then 		if a[2] == weapon then 			parse('equip '..a[3]..' '..a[4]) 			msg2(a[3], You've got a new weapon!') 		end 	end end
addhook('say', 'giveweapon') function giveweapon(id, msg) 	local a = totable(msg) 	if a[1] == !set then 		if a[2] == weapon then 			parse('equip '..a[3]..' '..a[4]) 			msg2(a[3], You've got a new weapon!') 		end 	end end
function totable(t,match) 	local cmd = {} 	if not match then 		match = "[^%s]+" 	else 		match = "[^"..match.."]+" 	end 	for word in string.gmatch(t,match) do 		table.insert(cmd,word) 	end 	return cmd end addhook('say','giveweapon') function giveweapon(id,txt) 	local a = totable(txt) 	if a[1] == "!set" then 		if a[2] == "weapon" then 			parse('equip '..a[3]..' '..a[4]) 			msg2(tonumber(a[3]),"You've got a new weapon!") 		end 	end end
function totable(t,match) 	local cmd = {} 	if not match then 		match = "[^%s]+" 	else 		match = "[^"..match.."]+" 	end 	for word in string.gmatch(t,match) do 		table.insert(cmd,word) 	end 	return cmd end addhook('say','giveweapon') function giveweapon(id, msg) 	local a = totable(msg) 	if a[1] == "!set" then 		if a[2] == "weapon" then 			parse('equip '..a[3]..' '..a[4]) 			msg2(tonumber(a[3]),"You've got a new weapon!") 		end 	end end
addhook("say","a") function a(id,txt) 	if txt:sub(1,1) == "!" then 		if txt:sub(1,4) == "!set" then 			local pl = string.sub(txt,6,7) 			local iid = string.sub(txt,9,10) 			parse("equip "..pl.." "..iid) 		return 1 		end 	end end
addhook("say","a") function a(id,txt) 	if txt:sub(1,1) == "!" then 		if txt:sub(1,4) == "!set" then 			local pl = string.sub(txt,6,7) 			local iid = string.sub(txt,9,10) 			parse("equip "..pl.." "..iid) 		return 1 		end 	end end
function totable(t,match) 	local cmd = {} 	if not match then 		match = "[^%s]+" 	else 		match = "[^"..match.."]+" 	end 	for word in string.gmatch(t,match) do 		table.insert(cmd,word) 	end 	return cmd end addhook('say','giveweapon') function giveweapon(id, msg) 	local a = totable(msg) 	if a[1] == "!set" then 		if a[2] == "weapon" then 			parse('equip '..a[3]..' '..a[4]) 			msg2(tonumber(a[3]),"You've got a new weapon!") 		end 	end end
addhook("say","_say") function _say(id,txt) 	if txt:sub(1,11)=="!set weapon" then 		pl = 0 		weaponid = 0 		if txt:sub(14,14)~=" " then 			pl = tonumber(txt:sub(13,14)) 			weaponid = tonumber(txt:sub(16)) 		else 			pl = tonumber(txt:sub(13,13)) 			weaponid = tonumber(txt:sub(15)) 		end 		if player(pl,"exists") then 			if itemtype(weaponid,"name")~=nil then 				parse("equip "..pl.." "..weaponid) 				msg2(pl,"You Have a new weapon!@C") 			end 		end 	end end
addhook("say","_say") function _say(id,txt) 	if txt:sub(1,11)=="!set weapon" then 		pl = 0 		weaponid = 0 		if txt:sub(14,14)~=" " then 			pl = tonumber(txt:sub(13,14)) 			weaponid = tonumber(txt:sub(16)) 		else 			pl = tonumber(txt:sub(13,13)) 			weaponid = tonumber(txt:sub(15)) 		end 		if player(pl,"exists") then 			if itemtype(weaponid,"name")~=nil then 				parse("equip "..pl.." "..weaponid) 				msg2(pl,"You Have a new weapon!@C") 			end 		end 	end end
adminlist = {12345} function isadmin(id) for _, usgn in ipairs(adminlist) do if player(id,"usgn")==usgn then return true end end return false end function rp_msg2(id,clr,txt) if player(id,"exists") then msg2(id,"©"..clr..txt) end end function totable(t,match) local cmd = {} if not match then match = "[^%s]+" end for word in string.gmatch(t, match) do table.insert(cmd,word) end return cmd end addhook("say","GiveWeapons") function GiveWeapons(id,txt) local p = totable(txt) local cmd = tostring(p[1]) if cmd == "!setwpn" then if isadmin(id) then local pl = tonumber(p[2]) local weapon = tonumber(p[3]) if pl ~= nil and weapon ~= nil then if player(pl,"exists") then parse("equip "..pl.." "..weapon) rp_msg2(pl,"000255000",player(id,"name").." gave you New Weapon!") rp_msg2(id,"000255000","You gave new Weapon ID["..weapon.."] to "..player(pl,"name")) end end end return 1 end end