Funnygatt

Skript 2.2 Functions

Dec 5th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. function giveKit(p: Player, c: Text) :: boolean:
  2. "%{fw::classes::list::*}%" contains "%{_c}%":
  3. clear {_p}'s inventory
  4. loop {fw::classes::%{_c}%::kit::*}:
  5. loop-value is boots, leggings, chestplate or helmet:
  6. equip {_p} with loop-value
  7. else:
  8. add loop-value to {_p}
  9. return true
  10. stop
  11. return false
  12.  
  13. function setClass(p: Player, animal: Text):
  14.  
  15. giveKit({_p}, {_animal}) = true:
  16. disguise {_P} as "%{_animal}%"
  17. sendMessage({_p}, "{@Logo}You've become a &a%{_animal}%", true)
  18. stop
  19. sendMessage({_p}, "{@Logo}Error. That kit doesn't exist!%nl%{@Logo}&cPlease contact an Admin!", true)
  20. stop
Advertisement
Add Comment
Please, Sign In to add comment