peace-maker / smrpg

A generic RPG plugin for SourceMod
89 stars 40 forks source link

A way to fix the max health bug #350

Open mikcla opened 4 years ago

mikcla commented 4 years ago

So in csgo the is a health cap for some reason, you can go over it, but it wont display it. If you go over the health cap and have health regen you health will reset. This is keeping me from makeing a csgo ultra rpg server. I wish you whould make it so when you get over 1000 hp it changes it to say 1k, and then you make is to dmg/1000 and hp regen/1000, and of course when you hit 1 mil hp you divid by 1.000.000. I know what i wish for is hard to create, so if you want the easy way out, you chould: Make it so when you hit over 10k hp, you make a ekstra hp bar. So if a player should take dmg the player first losses the ekstra hp bar, before lossing hp from the normal hp bar. Be sure to make hp regen and vampire work on the 2nd bar. I hope my spelling isn’t to bad, and sry for giveing you a hard challenge :)

peace-maker commented 4 years ago

This is related to #329.

The HP display is implemented in the client and can't be altered by the server afaik. Such a separate hp bar might be possible with some sprites parented to the player view model and hidden for other players. Could get some inspiration by https://forums.alliedmods.net/showthread.php?t=275699

I'm not going to implement this though.

peace-maker commented 4 years ago

Or use this https://forums.alliedmods.net/showthread.php?t=314962

mikcla commented 4 years ago

I have not tried yet, but it all looks right. You are a true hero <3

mikcla commented 4 years ago

@peace-maker 77 I am unsure how to use that link you sent, i am a smx of the first part, and a txt of the second. the first i put into plugins and the sencond i put into translations, but i still cant get over 32k hp without it glicthing. Am i using the code wrong, or do you have another way?, please answer quick, much love <3

WanekWest commented 1 year ago

If I'm not mistaken, there was a problem with setting HP for players, when you put HP less than 0 by SetEntityHealth(int iEntity), it will automatically be set to 32k. I hope I understood correctly what was being discussed.