Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function saveinv(w: text, p: player):
- set {_count} to 0
- loop 36 times:
- set {inv::%{_p}%::%{_count}%0::%{_w}%} to slot {_count} of {_p}'s inventory
- add 1 to {_count}
- set {inv::%{_p}%::helmet::%{_w}%} to {_p}'s helmet
- set {inv::%{_p}%::chest::%{_w}%} to {_p}'s chestplate
- set {inv::%{_p}%::legs::%{_w}%} to {_p}'s leggings
- set {inv::%{_p}%::feet::%{_w}%} to {_p}'s boots
- clear {_p}'s inventory
- function giveinv(w: text, p: player):
- clear {_p}'s inventory
- set {_count} to 0
- loop 36 times:
- set slot {_count} of {_p}'s inventory to {inv::%{_p}%::%{_count}%::%{_w}%}
- add 1 to {_count}
- set the helmet of {_p} to {inv::%{_p}%::helmet::%{_w}%}
- set the chestplate of {_p} to {inv::%{_p}%::chest::%{_w}%}
- set the leggings of {_p} to {inv::%{_p}%::legs::%{_w}%}
- set the boots of {_p} to {inv::%{_p}%::feet::%{_w}%}
- clear {inv::%{_p}%::*}
- command /setge:
- permission: sk.admin
- trigger:
- set {warp.Gefangnis} to location of player
- send "gestzt death"
- on rightclick:
- if name of entity is "Cop":
- open virtual chest with size 1 named "Polizei" to player
- set {_counter} to 0
- loop 9 times:
- format gui slot {_counter} of player with white glass pane named ""
- add 1 to set {_counter} to 0
- format gui slot 4 of player with lime concrete named "&aSchicht beginnen" with lore "Lohn= 10$ / 30 Minuten"
- format gui slot 8 of player with red concrete named "&cSchicht beenden"
- on inventory click:
- if player's current inventory's name is "Polizei":
- cancel event
- if clicked slot is 4:
- open virtual chest with size 1 named "Polizei" to player
- set {_counter} to 0
- loop 9 times:
- format gui slot {_counter} of player with white glass pane named ""
- add 1 to set {_counter} to 0
- format gui slot 3 of player with stone Shovel named "SWAT"
- format gui slot 4 of player with gray dye named "Gefängniswärter"
- format gui slot 5 of player with iron hoe named "Streife"
- on inventory click:
- if player's current inventory's name is "Polizei":
- cancel event
- if name of clicked item is "Gefängniswärter":
- saveinv("Polizei", player)
- on inventory click:
- if player's current inventory's name is "Polizei":
- cancel event
- if name of clicked item is "&cSchicht beenden":
- giveinv("Polizei", player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement