Artes-s

Tutor_Shield_by_Artes

Dec 22nd, 2015
647
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. @name Tutor_Shield_by_Artes
  2. @persist [O E Base Prop]:entity Just N Table:table
  3.  
  4. # ЭТО КОД ДЛЯ СОЗДАНИЯ ЩИТА ОТ ARTES'A
  5. # ETO KOD DLA SOZDANIYA SHITA 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,0)),vec(1,1,1),Base:toWorld(ang(90,90,0)),vec(255),"models/props_junk/sawblade001a.mdl"))
  14. Table:pushArray(array(Base:toWorld(vec(0,100,-50)),vec(0.01),Base:toWorld(ang(0,90,0)),vec(255),"models/props_lab/blastdoor001c.mdl"))
  15. }
  16. if(Table:count() > N) {
  17. while(holoCanCreate() & perf()) {
  18. N++
  19. local Holo = Table[N, array]
  20. holoCreate(N, Holo:vector(1), Holo:vector(2), Holo:angle(3), Holo:vector(4), Holo:string(5))
  21. holoMaterial(N, Holo:string(6))
  22. holoParent(N, Base)
  23. }
  24. } else {
  25. if(O:weapon():type() == "weapon_crowbar") { Just = 1 O:weapon():setAlpha(0) } else { Just = 0 }
  26.  
  27. if(changed(O:keyAttack2())&O:keyAttack2()){
  28. if(!Prop){
  29. Prop = propSpawn(holoEntity(2):model(),holoEntity(2):pos(),holoEntity(2):angles(),1)
  30. Prop:parentTo(holoEntity(2))
  31. #Prop:setAlpha(10)
  32.  
  33. }
  34. }
  35.  
  36. if(changed(Just)&Just) {
  37. holoPos(0,O:attachmentPos("anim_attachment_lh"))
  38. holoAng(0,O:attachmentAng("anim_attachment_lh"))
  39. holoPos(0,holoEntity(0):toWorld(vec(2,3,0)))
  40. holoAng(0,holoEntity(0):toWorld(ang(0,-10,0)))
  41. holoParentAttachment(0,O,"anim_attachment_lh")
  42. }
  43. elseif(!Just) {
  44. if(!first()){
  45. holoUnparent(0)
  46. holoPos(0,E:pos())
  47. holoAng(0,E:angles())
  48. holoParent(0,E)
  49. }
  50. }
  51. }
Add Comment
Please, Sign In to add comment