Advertisement
Artes-s

Tutor_Sword_by_Artes

Dec 22nd, 2015
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. @name Tutor_Sword_by_Artes
  2. @persist [O E Base]:entity Just N Table:table
  3.  
  4. # ЭТО КОД ДЛЯ СОЗДАНИЯ МЕЧА ОТ ARTES'A
  5. # ETO KOD DLA SOZDANIYA MECHA 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(0,0,180)),vec(255),"models/props_junk/meathook001a.mdl"))
  14. }
  15. if(Table:count() > N) {
  16. while(holoCanCreate() & perf()) {
  17. N++
  18. local Holo = Table[N, array]
  19. holoCreate(N, Holo:vector(1), Holo:vector(2), Holo:angle(3), Holo:vector(4), Holo:string(5))
  20. holoMaterial(N, Holo:string(6))
  21. holoParent(N, Base)
  22. }
  23. } else {
  24. if(O:weapon():type() == "weapon_crowbar") { Just = 1 O:weapon():setAlpha(0) } else { Just = 0 }
  25. if(changed(Just)&Just) {
  26. holoPos(0,O:attachmentPos("anim_attachment_rh"))
  27. holoAng(0,O:attachmentAng("anim_attachment_rh"))
  28. holoPos(0,holoEntity(0):toWorld(vec(1,2.5,10)))
  29. holoAng(0,holoEntity(0):toWorld(ang(0,-10,0)))
  30. holoParentAttachment(0,O,"anim_attachment_rh")
  31. }
  32. elseif(!Just) {
  33. if(!first()){
  34. holoUnparent(0)
  35. holoPos(0,E:pos())
  36. holoAng(0,E:angles())
  37. holoParent(0,E)
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement