Packs
Packs
It’s easy, you have to follow this model and no errors show.
- The file name is not important.
- The file must be a txt file and must be in the following folder : /plugins/BuyPack/Pack
- Each txt file is a pack.
- The # is accepted but the plugin considers them as a comment.
- Thanks to not put a # if it not start a line.
Model :
# The title of the pack. ATTENTION ‘the title must be the first before the others. Title:Exemple # description pack. Desc:My pack Example #How much it cost? Money :0 #The command must be running by the server. Command :gamemode 1 <player> #Enable the duration of pack. Timer :True #If timer is true, the plugin will take the time here.(See the time format) #Here it is 10 seconds. Time : 10S #Number of purchase permitted. If number is 0, the purchase permitted is not activated. NbPurchasePermitted: 2 #Command performed when the time is up. InvCommand :gamemode 0 <player>
Time format :
The time format is written like the exemple, 10S for 10 seconds. You put the number first and then the symbol. The symbols and their limits in numbers :
- S -> Second, limited to 59 seconds (60 = 1 minute)
- M -> Minute, limited to 59 minutes (60 = 1 hour)
- H -> Time limited to 23 hours (24 = 1 day)
- D -> Day, no limit to the reasonable.
I'll show you some examples:
- 1D 2H 3M 1S -> 1 day, 2 hours, 3 minutes and one second.
- 1D 3M 1S -> 1 day, 3 minutes and one second.
etc.
The important thing is that you have the number in is limit and the symbol. If you have multiple symbols, separate them by a space.
An exemple with this model:
The package is “Example”, its description is “my pack Example”,Price:0 The command performed: gamemode 1 <player>,the timer is set to true, so it will make the command gamemode 0 <player> after 10 seconds. The player is permitted to buy this pack just two times.
How to use Multiple Command :
Here’s how to write the multi command :
Command :gamemode 1 <player>
Command :gamemode 0 <player>
Etc.
As long as there Command :, it executes the command after the :
Ps- This also work with InvCommand.
Tag accepted:
<player> - tag to put the player's name.
Comments