Code (Everything is serverside)
So I have this brush entity, and I want to recreate func_buyzone from Counter-Strike: Source.
So in ENT:Initialize() the css table (Counter-Strike: Source in short) which contains data about itself.
Problem starts in ENT:KeyValue(), so there it assigns which team can use this buyzone.
When I print the css table there everything is fine.
Here it starts to get confusing.
So in ENT:StartTouch() it checks if a player is inside buyzone to see if he can use it.
But in there when I print the css table it's... Gone! It is a table, but an empty one.
I don't really know what could cause this.
Can you post your script?
Is it possible that the KeyValues are being set before the game calls Initialize? If that's the flow of the logic then you'd have a proper css table but then it would become an empty table upon Initialize because your declaration in that function isn't conditional.
TLDR remove line 9 or make it like line 13.
Yup! It fixed it! Lots of people struggled with it. Thanks for helping!
Sorry, you need to Log In to post a reply to this thread.