self.num_perks to 5 upon a player's spawn. That way whenever the player spawns they would start off with
self.num_perks = -5 which according to vending_think(), the thread will revert back to the start when
self.num_perks = 4; each perk you buy will add the variable to 1. With the change I propose, after buying 4 perks would total the variable to
-1. So long as the variable does not equal 4, you can buy as many perks as you want.
Apply this equation to make it easier:
(x * -1) + 4 = Amount of perks to buy on the map
Where (in this case)
x = -5 and according to the equation, it will equal 9. The only exception is that
x must equal a negative number.
just make a custom script and add
self.num_perks to a negative number in
level waittill ("connecting", player);
player thread onPlayerSpawned();
self.num_perks = -5; //Remove perk limit, must be a negative number