Forum

> > CS2D > General > How To Make Spawn With That And That Weapon?
Forums overviewCS2D overviewGeneral overviewLog in to reply

English How To Make Spawn With That And That Weapon?

3 replies
To the start Previous 1 Next To the start

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

Rainoth
Moderator Off Offline

Quote
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.

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

DC
Admin Off Offline

Quote
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.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview