Guest User

Untitled

a guest
Jun 30th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @name Simple Cloak
  2. @inputs
  3. @outputs
  4. @persist [Cloak]:number [O]:entity
  5. @trigger
  6.  
  7. if (first()) {
  8. O = owner() #Save owner to a variable, to reduce ops :>
  9. runOnChat(1) #Only run when someone speaks
  10. }
  11.  
  12. if (chatClk(O)) {
  13. LS = O:lastSaid():lower()
  14. if (LS == "cloak") {
  15. hideChat(1)
  16. Cloak = !Cloak
  17. printColor(vec(255,255,0),Cloak ? "Cloak engaged" : "Cloak disabled")
  18. O:setAlpha(Cloak ? 0 : 255)
  19. O:setMaterial(Cloak ? "Models/effects/vol_light001" : "")
  20. O:weapon():setAlpha(Cloak ? 0 : 255)
  21. }
  22. }
Add Comment
Please, Sign In to add comment