Author Topic: Totally Confused with Saving and Loading Score/Weapons  (Read 373 times)

So, I've been working on a really nice server, got a nice shop gui, points are given to the player who made the kill, nice terrain, etc, but, I cannot get it so when the player leaves and comes back, his previous weapons are still able to be loaded, and his score is able to loaded. Any suggestions? What addons should I be using to make this possible?

Should I use VCE (Which I have no idea how to use), or is there a script already. o:

There's a score loader in RTB.

Since you said you already have a nice shop system, but have no idea how to use VCE, then that means you are using that Shop Mod.  Don't do this.

It's ok for simple, early learning stuff for blockland, I think-I never used it, but VCE is much better because learning only a few things for it can allow you to make many other things.

VCE seems hard, but it really is extremely easy, beginners always assume its hard to learn, use, and a waste of time to do either also.  All that VCE is, in a nutshell, is If/Then, which is a different way of saying Cause/Effect.

Take the below code for example.  This is for a 1-item shop, just to make it easy.

Code: [Select]
[0] [Onactivate] [Client] [VCE_Ifvariable] [Money] [>=] [5] [1 3]
[1] [Onvariabletrue] [Client] [VCE_Modvariable] [Money] [Subtract] [5]
[2] [Onvariabletrue] [Client] [Centerprint] [You bought this thing]
[3] [Onvariabletrue] [Player] [additem] [Sword]
[4] [Onvariablefalse] [Client] [Centerprint] [You don't have enough money for this]

It is really easy to use.  First, someone clicks the brick.  Then, the computer checks to see if the player's money is more than or equal to 5.  Then, if this is true, then 5 is subtracted and the player gets the item.  If they don't have enough money, then a message says that you can't buy it.

VCE has saving and loading items and variables (money).

Code: [Select]
[0] [Onactivate] [Self] [VCE_Savevariable] [Client] [Money]
[1] [Onactivate] [Player] [Saveitem]

When you decide to learn VCE, search "Variable" on the forum's search function and download all of the addons you see, except for anything that says "Extension", unless it also says "Variable Replacer".

Issue with your example events, the OnVariableFalse cannot be triggered as you excluded it from the "if" statement
Change "1 3" to "1 4" and it's fine