Forum

> > CS2D > Scripts > Give Weapon Lua Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Give Weapon Lua Script

3 replies
To the start Previous 1 Next To the start

old Give Weapon Lua Script

KagamineLen
User Off Offline

Quote
I have a problem with a lua i think i need help to fix it

the script use used that like when you say "!laser101" it will give you a laser here's the script:

1
2
3
4
5
6
7
8
addhook("say","pbs.sayfuncs.say")
function pbs.sayfuncs.say(p,txt)

function equip(id,wid)
	parse('equip '..id..' '..wid)

	if (txt=="!laser101") then
			equip(id,45)

please help me

old Re: Give Weapon Lua Script

Infinite Rain
Reviewer Off Offline

Quote
function "equip" is not exists
use parse(consolecommand) for this
1
2
3
4
5
6
addhook('say', '_say')
function _say(id, text)
	if text == '!laser101' then
		parse('equip '.. id ..' 45')
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview