Forum

> > CS2D > Scripts > Equip not working with nightvision
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Equip not working with nightvision

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Equip not working with nightvision

Slooper 1
BANNED Off Offline

Zitieren
why when say equip id 59(nightvision) why didn't equiped ?
so i hope u answer my question.
byee

Admin/Mod Kommentar

"one thing ...." is a very bad title. Please choose MEANINGFUL titles in future. Fixed. /DC

alt Re: Equip not working with nightvision

GeoB99
Moderator Off Offline

Zitieren
There is actually a way to equip with this item indirectly. Use cs2d cmd spawnitem, specify the ID of the item (in this case 59 - Night Vision) and both the Tile_X and Tile_Y coordination as well of the map (you can find them by using the Map Editor).

@user Cebra: The issue still persists, no matter what if you equip to someone the Night Vision. And he meant his ID, not the ID word itself.

alt Re: Equip not working with nightvision

Hellcat
GAME BANNED Off Offline

Zitieren
Anyway you can edit the map and add the item with entities when start the server, it's easy using the map editor i never see this error in 4 years playing this game ...

alt Re: Equip not working with nightvision

Cure Pikachu
User Off Offline

Zitieren
Or you can just do this.
1
2
3
4
5
6
7
8
9
10
11
12
function equip(id,item)
	if player(id,"exists") and item and player(id,"health") > 0 then
		if item == 56 or item == 59 or item == 60 then
			local x, y = player(id,"x"), player(id,"y")
			parse("setpos "..id.." 0 0")
			parse("spawnitem "..item.." "..math.floor(x/32).." "..math.floor(y/32))
			parse("setpos "..id.." "..x.." "..y)
		else
			parse("equip "..id.." "..item)
		end
	end
end
EDIT: Search please - I found thread cs2d Equip nightvision and thread cs2d equip 1 59 error which pretty much answers the OP
1× editiert, zuletzt 31.12.15 20:04:03
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht