Artes-s

Tutor_Armor_by_Artes

Dec 22nd, 2015
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. @name Tutor_Armor_by_Artes
  2. @persist [O E Base]:entity Just N Table:table
  3.  
  4. # ЭТО КОД ДЛЯ СОЗДАНИЯ БРОНИ ОТ ARTES'A
  5. # ETO KOD DLA SOZDANIYA BRONI OT ARTES'A
  6.  
  7. interval(100)
  8. if(first()){
  9. E=entity()
  10. O=owner()
  11. List = "sprops/textures/sprops_metal3"
  12. Base = holoCreate(0,E:toWorld(vec(0,0,0)),vec(0.001),E:toWorld(ang(0,0,0)),vec(255),"cube")
  13. Table:pushArray(array(Base:toWorld(vec(0,0,5)),vec(0.5,0.9,0.4),Base:toWorld(ang(0,0,180)),vec(255),"models/hunter/blocks/cube05x05x05.mdl"))
  14. Table:pushArray(array(Base:toWorld(vec(0,0,0)),vec(0.4,0.8,0.3),Base:toWorld(ang(0,0,180)),vec(255),"models/hunter/blocks/cube05x05x05.mdl"))
  15. Table:pushArray(array(Base:toWorld(vec(0,0,-5)),vec(0.3,0.7,0.2),Base:toWorld(ang(0,0,180)),vec(255),"models/hunter/blocks/cube05x05x05.mdl"))
  16. }
  17. if(Table:count() > N) {
  18. while(holoCanCreate() & perf()) {
  19. N++
  20. local Holo = Table[N, array]
  21. holoCreate(N, Holo:vector(1), Holo:vector(2), Holo:angle(3), Holo:vector(4), Holo:string(5))
  22. holoMaterial(N, Holo:string(6))
  23. holoParent(N, Base)
  24. }
  25. } else {
  26. if(O:weapon():type() == "weapon_crowbar") { Just = 1 O:weapon():setAlpha(0) } else { Just = 0 }
  27.  
  28. if(changed(Just)&Just) {
  29. holoPos(0,O:attachmentPos("chest"))
  30. holoAng(0,O:attachmentAng("chest"))
  31. holoPos(0,holoEntity(0):toWorld(vec(0,0,-2)))
  32. holoAng(0,holoEntity(0):toWorld(ang(0,0,0)))
  33. holoParentAttachment(0,O,"chest")
  34. }
  35. elseif(!Just) {
  36. if(!first()){
  37. holoUnparent(0)
  38. holoPos(0,E:pos())
  39. holoAng(0,E:angles())
  40. holoParent(0,E)
  41. }
  42. }
  43. }
Add Comment
Please, Sign In to add comment