Garry's Mod

Garry's Mod

[PR]Star Wars Medical Sweps [Bacta Grenade, Bacta Injector, Force Heal]
43 条留言
Raphael 7 月 22 日 上午 11:55 
I'm not sure if you still update, but I looked into a minor issue. Whenever the max HP of a player is changed, like for an event character, the bacta injector and nade treat the player's max HP as the original, with the nade reducing the HP to the original amount (this is where event characters with 1000 HP would be brought back to 200) and the injector capping at the original max HP.

In the code, it seems the max HP that's used to calculate healing is determined when the player spawns or changes jobs, which could be good for performance, since you wouldn't need to call the ent:GetMaxHealth() method every time you try to heal someone, but it has no way of updating if the max HP does ever change. Setting up events with that in mind could just involve having someone respawn with a desired max HP, so I guess there's a way around the issue even without changing the code.

Setting ent.var to ent:GetMaxHealth() in the functions does fix this.

Thanks for the great addon!
Lunneth Arc 6 月 30 日 下午 2:28 
Bacta particles missing textures. Definitely one of the source data packs from CS:S. Any chance anyone knows what its called?
Onion 2024 年 12 月 7 日 下午 11:32 
[[PR]Star Wars Medical Sweps [Bacta Grenade, Bacta Injector, Force Heal]] lua/weapons/weapon_forceheal.lua:117: attempt to perform arithmetic on field 'var' (a nil value)
1. unknown - lua/weapons/weapon_forceheal.lua:117
|⁧⁧Riddick  [作者] 2024 年 4 月 20 日 下午 4:08 
Yeah if it's just a content pack go for it
Nagisa 2024 年 4 月 18 日 下午 12:40 
Good day,
Can I create my own add-on from your add-on? By that I mean I can take the sounds, models, materials and particles from your add-ons and put it all into an unlisted content pack. Of course without the Lua files @|⁧⁧Riddick
kamiowo 2022 年 10 月 19 日 下午 2:29 
my bacta dont have the texture
|⁧⁧Riddick  [作者] 2022 年 8 月 10 日 下午 12:04 
yeah sure
Sentinel 2022 年 8 月 9 日 下午 8:38 
Hey Riddick, Do I have permission to re-upload this for my server and to credit this addon with the link going to it and you as the author.
|⁧⁧Riddick  [作者] 2021 年 12 月 13 日 下午 8:06 
oof lol
D4KiR 2021 年 12 月 10 日 上午 1:39 
[[PR]Star Wars Medical Sweps [Bacta Grenade, Bacta Injector, Force Heal]] lua/autorun/server/storevar.lua:16: Tried to use a NULL entity!
1. Health - [C]:-1
2. unknown - lua/autorun/server/storevar.lua:16
muscleliger 2021 年 9 月 4 日 下午 7:21 
More specifically whats the model name for the bacta injector, i wpuld like to use it for pac3
muscleliger 2021 年 9 月 4 日 下午 7:16 
Hi! trying to use this in pac3, what is the model name!
|⁧⁧Riddick  [作者] 2021 年 5 月 11 日 下午 1:22 
sure
Triple T 2021 年 5 月 11 日 上午 7:29 
Is it fine I upload this content to a content pack and give credit in the description? Thanks for reading.
Sch3mbo 2021 年 2 月 6 日 上午 11:32 
In a server I play in I can heal others with Force heal, give them ammo but cant heal myself, just wondering if you knew about anything i could do
|⁧⁧Riddick  [作者] 2021 年 1 月 13 日 上午 1:59 
since you asked go for it
Promet 2021 年 1 月 11 日 下午 1:41 
Can I upload this addon to the content pack and give the description a link to your addon?
|⁧⁧Riddick  [作者] 2021 年 1 月 1 日 上午 2:47 
sure go for it man
Vaughn 2020 年 12 月 30 日 上午 4:44 
Permission to add this addon to a Content Addon full Link and Credit will be given! ;'D
SubZero112 2020 年 6 月 6 日 上午 10:25 
Does anyone know how to disable the ammo giving function on this weapon?
MrBalloons 2020 年 3 月 28 日 上午 11:09 
The Models aren't actually there, but i like the change to the Bacta Granade! I just would like it even more if it could be able to heal NPCs.
Magne 2019 年 8 月 9 日 上午 8:27 
Ya know the models for the stuff,
|⁧⁧Riddick  [作者] 2019 年 8 月 7 日 下午 1:01 
what
Magne 2019 年 8 月 7 日 上午 11:59 
Models?
Trader 2019 年 4 月 19 日 上午 10:41 
Thanks for sharing!!!
commanderIbanez 2019 年 3 月 2 日 上午 2:56 
I'm getting the following error:
tar_wars_medical_sweps_[bacta_grenade__bacta_injector__force_heal]_727824870/lua/weapons/weapon_bactainjector.lua:116: attempt to perform arithmetic on field 'var' (a nil value)
1. unknown - addons/[pr]star_wars_medical_sweps_[bacta_grenade__bacta_injector__force_heal]_727824870/lua/weapons/weapon_bactainjector.lua:116

Line 116 in the lua file states this:
if ( IsValid( ent ) ) then need = math.min( ent.var - ent:Health(), ent.var * .25 ) end

As this is in the section of the SWEP:PrimaryAttack() function, because of this error, you cannot heal other people. Healing yourself works fine, and perhaps too well considering that the ammo goes back to full in less than one second.
Mataim | Prism 2018 年 7 月 18 日 上午 7:26 
No healt
DazzleNegev67 2018 年 2 月 3 日 下午 10:05 
this is fucking gay
Lily 2018 年 1 月 24 日 下午 5:46 
so where's that update you promised on 1/10/2017 :thinking:
Centrelink Prospector 2017 年 12 月 25 日 上午 5:20 
What is the model for this in pac3?
Necrosis 2017 年 11 月 2 日 上午 6:28 
Any chance you can make a pack with an injecter that doesnt give ammo, only heal?
|⁧⁧Riddick  [作者] 2017 年 10 月 8 日 上午 11:51 
@Fudall wait are you falloutRP fudall?
Servius 2017 年 3 月 24 日 上午 11:37 
http://psteamcommunity.yuanyoumao.com/workshop/filedetails/?id=889827473
Alrighty. ^The above is live. Please add as required and update your addon accordingly. Done to avoid the constent conflicts all of us keep getting msgd about.
Kowalski 2017 年 3 月 22 日 上午 9:14 
How do we edit the health that adds it
Grant Ward 2017 年 3 月 7 日 下午 3:06 
I hate the sound so much xD
|⁧⁧Riddick  [作者] 2017 年 3 月 7 日 下午 1:19 
@[HN] Omega Assailant. This is intentional because frequently, in events, players run out of ammo. It is easier to make medics fill a more well rounded support role and get rid of the slow pre-election gear up time
Omega Assailant 2017 年 3 月 6 日 下午 7:29 
There is a problem with Force Heal and Bacta Injector where if you press R it will replenish ammo for the user and whoever you're doing it to as a very fast rate.
Grant Ward 2016 年 11 月 7 日 上午 2:45 
awesome work!
OtomCold 2016 年 9 月 20 日 下午 3:21 
Thank you for the reply!
|⁧⁧Riddick  [作者] 2016 年 9 月 20 日 下午 12:47 
It heals up to whatever health a player starts with. Meant for things like darkrp where certain jobs can have different amounts of health.
OtomCold 2016 年 9 月 20 日 上午 2:12 
How much does this heal up to?
Feriy 2016 年 7 月 24 日 上午 8:49 
You! Bacta, Now!

10/10 would bacta again.
Popo Bigles 2016 年 7 月 20 日 下午 3:12 
Star wars: Republic Commando

thats where its from...