Forum

> > CS2D > General > How To Make Spawn With That And That Weapon?
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch How To Make Spawn With That And That Weapon?

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: How To Make Spawn With That And That Weapon?

Rainoth
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
addhook("spawn","items")
function items(id)
parse("equip "..id.." 11")
parse("equip "..id.." 3")
parse("equip "..id.." 51")
parse("equip "..id.." 58")
end

Go to samples folder and find something like fast players
there is spawn hook exaple just change speedmod to equip and Item Id.

alt Re: How To Make Spawn With That And That Weapon?

DC
Admin Off Offline

Zitieren
spawn is a special case, you can use the return value of the hooked function. DO NOT use equip in the spawn hook.
return value = comma separated list of items which will be equipped on spawn

the following code is basically the same thing, but much shorter and more efficient:
1
2
3
4
addhook("spawn","items")
function items()
	return "11,3,51,58"
end

closed. use the lua scripting thread for further questions.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht