Forum

> > CS2D > Scripts > equip gasmask when collecting is disabled
Forums overviewCS2D overview Scripts overviewLog in to reply

English equip gasmask when collecting is disabled

3 replies
To the start Previous 1 Next To the start

old equip gasmask when collecting is disabled

hunter139
User Off Offline

Quote
hi there so i have this script which doesn't allow collecting weapons and i want to equip a gas mask to a player i used before to use this
Quote
parse("spawnitem 60 "..player(id,"tilex").." "..player(id,"tiley").."")

but since i can't collect things that code technically doesn't help so can you help me ? what should i do in this case ?

old Re: equip gasmask when collecting is disabled

DC
Admin Off Offline

Quote
@user SaZ Dice: No, you can only use cs2d cmd equip with inventory/slot items not with equipment like gas masks (I really should update the reference and add information about this).

@user hunter139: Temporarily allow collecting stuff. You can use cs2d lua cmd sethookstate
cs2d cmd setpos is also necessary I think, otherwise the player will not directly collect it but only when leaving and re-entering the tile (not sure)
1
2
3
4
sethookstate("walkover", 0)
parse("spawnitem 60 "..player(id,"tilex").." "..player(id,"tiley"))
parse("setpos "..id.." "..player(id,"x").." "..player(id,"y"))
sethookstate("walkover", 1)

And people: Please stop writing
1
..""
It's nonsense! It attaches an empty string = it attaches NOTHING. Nobody seems to understand what really happens there... attaching empty strings to strings NEVER makes any sense.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview