Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name RPG
- @persist Prop:entity Type:string
- @persist GTable:gtable [RPG PRPG]:array Wielder:entity
- @persist
- if(first()|dupefinished()){
- runOnTick(1)
- runOnLast(1)
- function decide(N) {
- if(Wielder:weapon():type() == "weapon_rpg"){
- holoUnparent(0)
- holoPos(0,Wielder:attachmentPos("anim_attachment_RH"))
- holoAng(0,Wielder:attachmentAng("anim_attachment_RH") + ang(-5,0,0))
- holoParentAttachment(0,Wielder,"anim_attachment_RH")
- #holoUnparent(100)
- #holoParent(100,world())
- Wielder:weapon():setAlpha(0)
- }
- else{
- if(Type == "weapon_rpg"|N == 1){
- holoUnparent(0)
- holoPos(0,Wielder:shootPos() - Wielder:eye() * 8)
- holoAng(0,Wielder:attachmentAng("chest")*0.2 + ang(-90,120,0))
- holoParentAttachment(0,Wielder,"chest")
- #holoUnparent(100)
- #holoParentAttachment(100,Wielder,"anim_attachment_RH")
- }
- }
- Type = Wielder:weapon():type()
- }
- #print(owner():attachments())
- GTable = gTable("weapon_rpg",1)
- entity():setAlpha(0)
- entity():propNotSolid(1)
- timer("init",1000)
- Prop = propSpawn("models/weapons/w_rocket_launcher.mdl",entity():boxCenterW() + vec(0,0,20),entity():angles():setPitch(0):setRoll(0),1)
- Prop:setAlpha(0)
- holoCreate(0,Prop:toWorld(vec(13,-1,1)),vec(0.1),Prop:angles() + ang(0,180,0))
- holoAlpha(0,0)
- RPG[1,entity] = holoCreate(1,holoEntity(0):toWorld(vec(0)),vec(0.2,0.1,0.6),holoEntity(0):angles(),vec(210,190,130),"hqrcube")
- holoMaterial(1,"models/props_wasteland/concretefloor010a")
- holoDisableShading(1,1)
- holoParent(1,0)
- RPG[2,entity] = holoCreate(2,RPG[1,entity]:toWorld(vec(-3,0,4.5)),vec(0.3,0.3,2),RPG[1,entity]:angles() + ang(90,0,0),vec(90),"hq_tube_thick")
- holoMaterial(2,"phoenix_storms/grey_chrome")
- holoDisableShading(2,1)
- holoParent(2,1)
- RPG[3,entity] = holoCreate(3,RPG[1,entity]:toWorld(vec(-11,0,0.4)),vec(0.2,0.1,0.5),RPG[1,entity]:angles() + ang(15,0,0),vec(210,190,130),"hqrcube")
- holoMaterial(3,"models/props_wasteland/concretefloor010a")
- holoDisableShading(3,1)
- holoParent(3,2)
- RPG[4,entity] = holoCreate(4,RPG[1,entity]:toWorld(vec(-22.2,0,4.5)),vec(0.3,0.3,1.2),RPG[1,entity]:angles() + ang(90,0,0),vec(210,190,130),"hq_tube_thick")
- holoMaterial(4,"models/props_wasteland/concretefloor010a")
- holoParent(4,2)
- RPG[5,entity] = holoCreate(5,RPG[1,entity]:toWorld(vec(-41,0,4.5)),vec(0.3,0.3,2),RPG[1,entity]:angles() + ang(-90,0,0),vec(210,190,130),"hq_cone")
- holoMaterial(5,"models/props_wasteland/concretefloor010a")
- holoClip(5,1,vec(0,0,-4.5),vec(0,0,-1),0)
- holoClip(5,2,vec(0,0,-11.8),vec(0,0,1),0)
- holoClipEnabled(5,1,1)
- holoClipEnabled(5,2,1)
- holoParent(5,4)
- RPG[6,entity] = holoCreate(6,RPG[1,entity]:toWorld(vec(-35.4,0,4.5)),vec(0.21,0.21,1),RPG[1,entity]:angles() + ang(90,0,0),vec(210,190,130),"hq_tube_thick")
- holoMaterial(6,"models/props_wasteland/concretefloor010a")
- holoParent(6,4)
- RPG[7,entity] = holoCreate(7,RPG[1,entity]:toWorld(vec(-40.8,0,4.5)),vec(0.4,0.4,1.88),RPG[1,entity]:angles() + ang(90,0,0),vec(80),"hq_cone")
- holoMaterial(7,"phoenix_storms/grey_chrome")
- holoDisableShading(7,1)
- holoClip(7,1,vec(0,0,0),vec(0,0,-1),0)
- holoClip(7,2,vec(0,0,-11.2),vec(0,0,1),0)
- holoClipEnabled(7,1,1)
- holoClipEnabled(7,2,1)
- holoParent(7,4)
- RPG[8,entity] = holoCreate(8,RPG[1,entity]:toWorld(vec(-44.3,0,4.5)),-vec(0.34,0.34,1.27),RPG[1,entity]:angles() + ang(-90,0,0),vec(70),"hq_cone")
- holoMaterial(8,"phoenix_storms/grey_chrome")
- holoDisableShading(8,1)
- holoClip(8,1,vec(0,0,-2.91),vec(0,0,1),0)
- holoClip(8,2,vec(0,0,7.5),vec(0,0,-1),0)
- holoClipEnabled(8,1,1)
- holoClipEnabled(8,2,1)
- holoParent(8,7)
- RPG[9,entity] = holoCreate(9,RPG[1,entity]:toWorld(vec(-52,0,4.5)),vec(0.35,0.35,0.1),RPG[1,entity]:angles() + ang(90,0,0),vec(80),"hqtorus")
- holoMaterial(9,"phoenix_storms/grey_chrome")
- holoDisableShading(9,1)
- holoParent(9,7)
- RPG[10,entity] = holoCreate(10,RPG[1,entity]:toWorld(vec(-11,0,6.5)),vec(0.4,0.15,0.05),RPG[1,entity]:angles(),vec(50),"hqrcube")
- holoDisableShading(10,1)
- holoParent(10,2)
- RPG[11,entity] = holoCreate(11,RPG[10,entity]:toWorld(vec(-0.7,0.6,0.9)),vec(0.2,0.02,0.1),RPG[10,entity]:angles(),vec(50),"hq_cube")
- holoDisableShading(11,1)
- holoParent(11,10)
- RPG[12,entity] = holoCreate(12,RPG[10,entity]:toWorld(vec(-0.7,-0.6,0.9)),vec(0.2,0.02,0.1),RPG[10,entity]:angles(),vec(50),"hq_cube")
- holoDisableShading(12,1)
- holoParent(12,10)
- RPG[13,entity] = holoCreate(13,RPG[10,entity]:toWorld(vec(-0.7,0,2.4)),vec(0.2,0.2,0.25),RPG[10,entity]:angles() + ang(90,0,0),vec(50),"hq_tube")
- holoDisableShading(13,1)
- holoParent(13,10)
- RPG[14,entity] = holoCreate(14,RPG[10,entity]:toWorld(vec(-0.7,0,2.4)),vec(0.15,0.15,0.4),RPG[10,entity]:angles() + ang(90,0,0),vec(40),"hq_tube")
- holoDisableShading(14,1)
- holoParent(14,10)
- RPG[15,entity] = holoCreate(15,RPG[10,entity]:toWorld(vec(-3,0,2.4)),vec(0.11,0.11,0.03),RPG[10,entity]:angles() + ang(90,0,0),vec(255),"hqrcylinder")
- holoAlpha(15,4)
- holoParent(15,14)
- RPG[16,entity] = holoCreate(16,RPG[10,entity]:toWorld(vec(-3,0,2.4)),vec(0.01,0.01,0.005),RPG[10,entity]:angles() + ang(90,0,0),vec(255,0,0),"hq_cylinder")
- holoParent(16,15)
- RPG[17,entity] = holoCreate(17,RPG[10,entity]:toWorld(vec(1,0,2.4)),vec(0.11,0.11,0.03),RPG[10,entity]:angles() + ang(90,0,0),vec(255),"hqrcylinder")
- holoAlpha(17,4)
- holoParent(17,14)
- RPG[18,entity] = holoCreate(18,RPG[1,entity]:toWorld(vec(1,0,2.5)),vec(0.5,0.15,0.1),RPG[1,entity]:angles(),vec(90),"hq_cube")
- holoParent(18,1)
- RPG[19,entity] = holoCreate(19,RPG[1,entity]:toWorld(vec(0,0,1.5)),vec(0.25,0.15,0.2),RPG[1,entity]:angles(),vec(90),"hq_cube")
- holoParent(19,1)
- RPG[20,entity] = holoCreate(20,RPG[1,entity]:toWorld(vec(2,0,1.3)),vec(0.15,0.3,0.15),RPG[1,entity]:angles() + ang(90,90,0),vec(90),"hqstube2")
- holoParent(20,1)
- RPG[21,entity] = holoCreate(21,RPG[1,entity]:toWorld(vec(2.7,0,1.2)),vec(0.25,0.3,0.1),RPG[1,entity]:angles() + ang(90,90,0),vec(90),"hq_tube_thick")
- holoClip(21,1,vec(0.6,0,0),vec(-1,0,0),0)
- holoClip(21,2,vec(0,0.3,0),vec(0,1,0),0)
- holoClipEnabled(21,1,1)
- holoClipEnabled(21,2,1)
- holoParent(21,1)
- holoCreate(100,holoEntity(0):pos(),holoScale(0),holoEntity(0):angles(),vec(255))
- PRPG[1,entity] = holoCreate(101,RPG[1,entity]:pos(),holoScale(1),RPG[1,entity]:angles(),RPG[1,entity]:getColor(),"hqrcube")
- holoMaterial(101,"models/props_wasteland/concretefloor010a")
- holoDisableShading(101,1)
- holoParent(101,100)
- PRPG[2,entity] = holoCreate(102,RPG[2,entity]:pos(),holoScale(2),RPG[2,entity]:angles(),RPG[2,entity]:getColor(),"hq_tube_thick")
- holoMaterial(102,"phoenix_storms/grey_chrome")
- holoDisableShading(102,1)
- holoParent(102,101)
- PRPG[3,entity] = holoCreate(103,RPG[3,entity]:pos(),holoScale(3),RPG[3,entity]:angles(),RPG[3,entity]:getColor(),"hqrcube")
- holoMaterial(103,"models/props_wasteland/concretefloor010a")
- holoDisableShading(103,1)
- holoParent(103,102)
- PRPG[4,entity] = holoCreate(104,RPG[4,entity]:pos(),holoScale(4),RPG[4,entity]:angles(),RPG[4,entity]:getColor(),"hq_tube_thick")
- holoMaterial(104,"models/props_wasteland/concretefloor010a")
- holoParent(104,102)
- PRPG[5,entity] = holoCreate(105,RPG[5,entity]:pos(),holoScale(5),RPG[5,entity]:angles(),RPG[5,entity]:getColor(),"hq_cone")
- holoMaterial(105,"models/props_wasteland/concretefloor010a")
- holoClip(105,1,vec(0,0,-4.5),vec(0,0,-1),0)
- holoClip(105,2,vec(0,0,-11.8),vec(0,0,1),0)
- holoClipEnabled(105,1,1)
- holoClipEnabled(105,2,1)
- holoParent(105,104)
- PRPG[6,entity] = holoCreate(106,RPG[6,entity]:pos(),holoScale(6),RPG[6,entity]:angles(),RPG[6,entity]:getColor(),"hq_tube_thick")
- holoMaterial(106,"models/props_wasteland/concretefloor010a")
- holoParent(106,104)
- PRPG[7,entity] = holoCreate(107,RPG[7,entity]:pos(),holoScale(7),RPG[7,entity]:angles(),RPG[7,entity]:getColor(),"hq_cone")
- holoMaterial(107,"phoenix_storms/grey_chrome")
- holoDisableShading(107,1)
- holoClip(107,1,vec(0,0,0),vec(0,0,-1),0)
- holoClip(107,2,vec(0,0,-11.2),vec(0,0,1),0)
- holoClipEnabled(107,1,1)
- holoClipEnabled(107,2,1)
- holoParent(107,104)
- PRPG[8,entity] = holoCreate(108,RPG[8,entity]:pos(),holoScale(8),RPG[8,entity]:angles(),RPG[8,entity]:getColor(),"hq_cone")
- holoMaterial(108,"phoenix_storms/grey_chrome")
- holoDisableShading(108,1)
- holoClip(108,1,vec(0,0,-2.91),vec(0,0,1),0)
- holoClip(108,2,vec(0,0,7.5),vec(0,0,-1),0)
- holoClipEnabled(108,1,1)
- holoClipEnabled(108,2,1)
- holoParent(108,107)
- PRPG[9,entity] = holoCreate(109,RPG[9,entity]:pos(),holoScale(9),RPG[9,entity]:angles(),RPG[9,entity]:getColor(),"hqtorus")
- holoMaterial(109,"phoenix_storms/grey_chrome")
- holoDisableShading(109,1)
- holoParent(109,107)
- PRPG[10,entity] = holoCreate(110,RPG[10,entity]:pos(),holoScale(10),RPG[10,entity]:angles(),RPG[10,entity]:getColor(),"hqrcube")
- holoDisableShading(110,1)
- holoParent(110,102)
- PRPG[11,entity] = holoCreate(111,RPG[11,entity]:pos(),holoScale(11),RPG[11,entity]:angles(),RPG[11,entity]:getColor(),"hq_cube")
- holoDisableShading(111,1)
- holoParent(111,110)
- PRPG[12,entity] = holoCreate(112,RPG[12,entity]:pos(),holoScale(12),RPG[12,entity]:angles(),RPG[12,entity]:getColor(),"hq_cube")
- holoDisableShading(112,1)
- holoParent(112,110)
- PRPG[13,entity] = holoCreate(113,RPG[13,entity]:pos(),holoScale(13),RPG[13,entity]:angles(),RPG[13,entity]:getColor(),"hq_tube")
- holoDisableShading(113,1)
- holoParent(113,110)
- PRPG[14,entity] = holoCreate(114,RPG[14,entity]:pos(),holoScale(14),RPG[14,entity]:angles(),RPG[14,entity]:getColor(),"hq_tube")
- holoDisableShading(114,1)
- holoParent(114,110)
- PRPG[15,entity] = holoCreate(115,RPG[15,entity]:pos(),holoScale(15),RPG[15,entity]:angles(),RPG[15,entity]:getColor(),"hqrcylinder")
- holoAlpha(115,4)
- holoParent(115,114)
- PRPG[16,entity] = holoCreate(116,RPG[16,entity]:pos(),holoScale(16),RPG[16,entity]:angles(),RPG[16,entity]:getColor(),"hq_cylinder")
- holoParent(116,115)
- PRPG[17,entity] = holoCreate(117,RPG[17,entity]:pos(),holoScale(17),RPG[17,entity]:angles(),RPG[17,entity]:getColor(),"hqrcylinder")
- holoAlpha(117,4)
- holoParent(117,114)
- PRPG[18,entity] = holoCreate(118,RPG[18,entity]:pos(),holoScale(18),RPG[18,entity]:angles(),RPG[18,entity]:getColor(),"hq_cube")
- holoParent(118,101)
- PRPG[19,entity] = holoCreate(119,RPG[19,entity]:pos(),holoScale(19),RPG[19,entity]:angles(),RPG[19,entity]:getColor(),"hq_cube")
- holoParent(119,101)
- PRPG[20,entity] = holoCreate(120,RPG[20,entity]:pos(),holoScale(20),RPG[20,entity]:angles(),RPG[20,entity]:getColor(),"hqstube2")
- holoParent(120,101)
- PRPG[21,entity] = holoCreate(121,RPG[21,entity]:pos(),holoScale(21),RPG[21,entity]:angles(),RPG[21,entity]:getColor(),"hq_tube_thick")
- holoClip(121,1,vec(0.6,0,0),vec(-1,0,0),0)
- holoClip(121,2,vec(0,0.3,0),vec(0,1,0),0)
- holoClipEnabled(121,1,1)
- holoClipEnabled(121,2,1)
- holoParent(121,101)
- for(P = 1,players():count()){
- for(H = 101,121){
- holoVisible(H,players()[P,entity],0)
- }
- }
- #holoPos(0,owner():attachmentPos("anim_attachment_RH"))
- #holoAng(0,owner():attachmentAng("anim_attachment_RH"))
- #holoParentAttachment(0,owner(),"anim_attachment_RH")
- }
- else{
- if(clk("init")){
- #Prop:propFreeze(0)
- }
- if(Wielder:isValid() == 0){
- for(P = 1,players():count()){
- if(players()[P,entity]:aimEntity() == Prop){
- if(changed(players()[P,entity]:keyUse())){
- if(players()[P,entity]:keyUse()){
- if(GTable[players()[P,entity]:steamID64()+",own",number] == 0){
- GTable[players()[P,entity]:steamID64()+",own",number] = 1
- GTable[players()[P,entity]:steamID64()+",ammo",number] = 16
- Wielder = players()[P,entity]
- decide(1)
- RPG[1,entity]:soundPlay(1,2,"BaseCombatCharacter.AmmoPickup")
- for(H = 1,21){
- holoVisible(H,Wielder,0)
- }
- for(H = 101,121){
- holoVisible(H,Wielder,1)
- }
- Prop:propDelete()
- }
- else{
- RPG[1,entity]:soundPlay(1,2,"Buttons.snd2")
- }
- }
- }
- }
- }
- }
- else{
- if(Wielder:weapon():type() == "weapon_rpg"){
- holoAng(100,Wielder:eyeAngles())
- if(Wielder:keyAttack2()){
- holoPos(100,owner():shootPos() + owner():eye() * 20 - vec(0,0,9))
- holoAng(100,(Wielder:aimPos() - owner():shootPos()):toAngle())
- }
- else{
- holoPos(100,owner():shootPos() + owner():eye() * 10 + owner():right() * 6 - vec(0,0,6))
- holoAng(100,Wielder:eyeAngles())
- }
- }
- else{
- }
- }
- if(changed(owner():weapon())){
- decide(0)
- }
- #holoPos(0,owner():attachmentPos("anim_attachment_RH"))
- #holoAng(0,owner():attachmentAng("anim_attachment_RH"))
- }
- if(last()){
- GTable[Wielder:steamID64() + ",own",number] = 0
- }
- #Cheesecake propSpawn()
Advertisement
Add Comment
Please, Sign In to add comment