Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Tutor_Shield_by_Artes
- @persist [O E Base Prop]:entity Just N Table:table
- # ЭТО КОД ДЛЯ СОЗДАНИЯ ЩИТА ОТ ARTES'A
- # ETO KOD DLA SOZDANIYA SHITA OT ARTES'A
- interval(100)
- if(first()){
- E=entity()
- O=owner()
- List = "sprops/textures/sprops_metal3"
- Base = holoCreate(0,E:toWorld(vec(0,0,0)),vec(0.001),E:toWorld(ang(0,0,0)),vec(255),"cube")
- 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"))
- 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"))
- }
- if(Table:count() > N) {
- while(holoCanCreate() & perf()) {
- N++
- local Holo = Table[N, array]
- holoCreate(N, Holo:vector(1), Holo:vector(2), Holo:angle(3), Holo:vector(4), Holo:string(5))
- holoMaterial(N, Holo:string(6))
- holoParent(N, Base)
- }
- } else {
- if(O:weapon():type() == "weapon_crowbar") { Just = 1 O:weapon():setAlpha(0) } else { Just = 0 }
- if(changed(O:keyAttack2())&O:keyAttack2()){
- if(!Prop){
- Prop = propSpawn(holoEntity(2):model(),holoEntity(2):pos(),holoEntity(2):angles(),1)
- Prop:parentTo(holoEntity(2))
- #Prop:setAlpha(10)
- }
- }
- if(changed(Just)&Just) {
- holoPos(0,O:attachmentPos("anim_attachment_lh"))
- holoAng(0,O:attachmentAng("anim_attachment_lh"))
- holoPos(0,holoEntity(0):toWorld(vec(2,3,0)))
- holoAng(0,holoEntity(0):toWorld(ang(0,-10,0)))
- holoParentAttachment(0,O,"anim_attachment_lh")
- }
- elseif(!Just) {
- if(!first()){
- holoUnparent(0)
- holoPos(0,E:pos())
- holoAng(0,E:angles())
- holoParent(0,E)
- }
- }
- }
Add Comment
Please, Sign In to add comment