Author Topic: Need help with unlocking system  (Read 636 times)

Aye! Today I have decided to make a new trench wars but with unlocking system(for example you get 20 points and you unlock a pistol, you can use it but points won't spend). Do you know how to do that?

You'd need VCE for this.

Onactivate > self > vceretrocheck > ifplayerscore >= 20
Onvariabletrue > player > additem > pistol
Onvariablefalse > client > chatmessage > "You need 20 points."
Onvariabletrue > client > chatmessage > "Weapon recieved!"

The last 2 lines are optional messages you can add, not needed for any of the actual shop system. The first line checks to see if you have 20 or more points, the second gives you the reward for having that many. If you wanted to lower their score after buying, you'd just add a Variabletrue > client > addscore > -20.

You'd need VCE for this.

Onactivate > self > vceretrocheck > ifplayerscore >= 20
Onvariabletrue > player > additem > pistol
Onvariablefalse > client > chatmessage > "You need 20 points."
Onvariabletrue > client > chatmessage > "Weapon recieved!"

The last 2 lines are optional messages you can add, not needed for any of the actual shop system. The first line checks to see if you have 20 or more points, the second gives you the reward for having that many. If you wanted to lower their score after buying, you'd just add a Variabletrue > client > addscore > -20.
Thank you so much