English Equip not working with nightvision

6 replies
Goto Page
To the start Previous 1 Next To the start
Up
Slooper 1
BANNED
Offline Off
why when say equip id 59(nightvision) why didn't equiped ?
so i hope u answer my question.
byee
Multiple account of Ya_Bogalb (a.k.a TN Anonymous)

Admin/mod comment:

"one thing ...." is a very bad title. Please choose MEANINGFUL titles in future. Fixed. /DC
31.12.15 07:17:29 pm
Up
Hellcat
GAME BANNED
Offline Off
This is the error.
Code:
1
ERROR: equip - cannot equip 59 - Night Vision (this would lead to problems)!
31.12.15 07:26:40 pm
Up
Joghurt
User
Offline Off
You have to write instead "id" your personal id at the server
loading...
31.12.15 07:28:08 pm
Up
Fraizeraust
Moderator
Offline Off
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 Joghurt: 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.
31.12.15 07:35:34 pm
Up
Hellcat
GAME BANNED
Offline Off
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 ...
31.12.15 07:48:54 pm
Up
Cure Pikachu
User
Offline Off
Or you can just do this.
Code:
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
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
31.12.15 09:19:06 pm
Up
VADemon
User
Offline Off
Or use TooManyWeapons, it's fixed there. If you don't need the menu, you can just use the internal function for it or edit it to fit your needs.
To the start Previous 1 Next To the start