Forum

> > CS2D > Scripts > equip gasmask when collecting is disabled
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch equip gasmask when collecting is disabled

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt equip gasmask when collecting is disabled

hunter139
User Off Offline

Zitieren
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
Zitat
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 ?

alt Re: equip gasmask when collecting is disabled

DC
Admin Off Offline

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