Forum

> > CS2D > Scripts > Give Weapon Lua Script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Give Weapon Lua Script

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Give Weapon Lua Script

KagamineLen
User Off Offline

Zitieren
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

alt Re: Give Weapon Lua Script

Infinite Rain
Reviewer Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht