Forum

> > CS2D > Scripts > Equip not working with nightvision
Forums overviewCS2D overview Scripts overviewLog in to reply

English Equip not working with nightvision

6 replies
To the start Previous 1 Next To the start

old Equip not working with nightvision

Slooper 1
BANNED Off Offline

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

Admin/mod comment

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

old Re: Equip not working with nightvision

GeoB99
Moderator Off Offline

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

old Re: Equip not working with nightvision

Hellcat
GAME BANNED Off Offline

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

old Re: Equip not working with nightvision

Cure Pikachu
User Off Offline

Quote
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
edited 1×, last 31.12.15 08:04:03 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview