attempt to call method 'SetRenderOrigin' (a nil value)

Hello, I have a little problem with my playermodels and the custom weapons (cs:go) on my ttt server. Sometimes the position of the weapons is wrong (they are not in the hand). This is the error:

[ERROR] addons/spawn_csgo/lua/weapons/weapon_zm_rifle/shared.lua:324: attempt to call method 'SetRenderOrigin' (a nil value)
  1. DrawWorldModel - addons/spawn_csgo/lua/weapons/weapon_zm_rifle/shared.lua:324
   2. unknown - addons/spawn_csgo/lua/weapons/weapon_zm_rifle/shared.lua:288

This is the script:

I hope you can help me. I am despairing.


Put “if ( SERVER ) then return end” at the top of the DrawWorldModel function.

Ty for ur help it worked, so our next problem is that the weapons still are in the head of the costum models.
This problem appears only with cs:go weapons, not with standard ttt weapons. So there must be a mistake in the script