Forum

> > CS2D > Scripts > is gas mask an armour or an weapon type?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch is gas mask an armour or an weapon type?

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt geschlossen is gas mask an armour or an weapon type?

robed
User Off Offline

Zitieren
is gas mask an armour?
im trying to make a script
but i dont know that id is it when it comes to armour?
(id,"armor")==

if its not an armour
is it a weapons?
well if it is!
is should be like this
(id,"weapontype")==60

alt Re: is gas mask an armour or an weapon type?

DC
Admin Off Offline

Zitieren
It is no armor. It behaves like the night vision or the defusekit. It's a slotless equipment item.

Unfortunately I forgot to add the right functionality to the cs2d lua cmd player command. Otherwise you would be able to use it to detect if a player has a gas mask or not. I'll add this for the next release.
1× editiert, zuletzt 30.06.12 17:21:32

alt Re: is gas mask an armour or an weapon type?

robed
User Off Offline

Zitieren
thanks

now i can make a heal system with it

addhook("second","healsystem")
function healsystem()
for id=1,32 do
if player(id,"item")==60 then
parse("sethealth "..id.." "..player(id,"health")+2)
end
end
end

EDT; i just realised. it never worked


EDT2: oh sorry. i never realised.. please remove this topic pelase
this is my script for the future
4× editiert, zuletzt 30.06.12 17:26:36

alt Re: is gas mask an armour or an weapon type?

DC
Admin Off Offline

Zitieren
You can't do it with the current version as I already tried to explain!

NEXT VERSION (NOT NOW) you'll be able to use
1
2
3
if player(id,"gasmask") then
	-- do healstuff
end

player(id,"item") doesn't work because this always returns the currently selected weapon in the hand of the player. The player NEVER uses the gasmask as weapon in its hand.
1× editiert, zuletzt 30.06.12 17:23:25
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht