Alright, i decided to rewrite me previous post.
So i have an entity that when spawned outputs that a money case has been dropped and if you find it and press use it gives you the amount of DarkRP money stored in the variable named casevalue.
I was wondering how i could make a chat command that sets the variable inside the entity and spawns the entity with that value
!moneycase 10000 and that would set the case value variable to 10k and spawn the entity into the game.
i apoligise for rewriting the thread.
I am very new to lua scripting and i just hope you awesome people here can help me out