Pivity

Darkrp SetMaxHealth Help

Last read Never
#1

hook.Add( "PlayerSpawn", "setmaxhealthshitt", function(ply) ply:SetHealth(500) end )

Thats the code, So basically I'm wanting to have a global function that sets all players to 500 health without having to add a customcheck to every single job. This code is not causing any script errors but also not setting player health If anyone has any ideas why this isn't working please explain, Thank you.

#2

so basically this isn't darkrp support for a server. go to the darkrp forums http://forum.darkrp.com/

and oh i wonder what this is!! WOOOWWWWWWW A SIMPLE GOOGLE SEARCH

Top two links have job code in there my dude http://lmgtfy.com/?iie=1&q=how+to+set+max+health+on+a+job+darkrp

Edited here is your best bet https://facepunch.com/showthread.php?t=1476514&p=48233612&viewfull=1#post48233612

Optimistic x 1
#3

http://prntscr.com/h50fb9

hook.Add( "PlayerSpawn", "setmaxhealthshitt", function(ply)
timer.Simple(1, function() -- Wait till after darkrp sets your health
ply:SetHealth(500)
end)
end)

But yeah for the future your best bet is to post on Facepunch or the link Anthony provided :P Good luck!

#4
By-ICE-at 1st of November 2017 21:07:16
OR Modify thisgamemode\darkrp\gamemode\modules\base\sv_util.lua Line 172

NOOOOOOO DONT EDIT THE CORE FILES NOOOOOOOOOOOO

edut: This was a joke.

Disagree x 2
#5

~~snip, didnt read~~

What you want to do is add this value into your DarkRP settings file somewhere at the bottom: GAMEMODE.Config.startinghealth = 500

Agree x 1
#6
By[PC] Snowaat 1st of November 2017 21:11:59
NOOOOOOO DONT EDIT THE CORE FILES NOOOOOOOOOOOO

Don't edit them if you don't know what you're doing, and don't ask for support on the darkrp site if you did modify them. I removed half of the core files becuase most of it is useless for my servers.

Edited

ByThreebowat 1st of November 2017 21:28:08
~~snip, didnt read~~What you want to do is add this value into your DarkRP settings file somewhere at the bottom:GAMEMODE.Config.startinghealth = 500

Eh I only suggested that if he wanted to do some kind of custom check in case he wanted a job not to have 500 health.

Edit: Removed that suggestion so people don't go fucking their Darkrp up and blame me for it :P

Agree x 1
#7

delete your darkrp folder and make your own darkrp

there u go fixed

Funny x 2Agree x 1Dumb x 1
#8
By-ICE-at 1st of November 2017 21:38:18
Don't edit them if you don't know what you're doing, and don't ask for support on the darkrp site if you did modify them. I removed half of the core files becuase most of it is useless for my servers.EditedEh I only suggested that if he wanted to do some kind of custom check in case he wanted a job not to have 500 health.Edit: Removed that suggestion so people don't go fucking their Darkrp up and blame me for it :P

Editing DarkRP is good sometimes, but you have to really know what you're doing. I did it once because I needed a hook for when someone takes a weapon out of a shipment.

Agree x 1
#9

Lol I guess I need to edit my post. I was just being a meme. Usually people freak out when you edit the core files. I was just joking man.

Friendly x 1
#10

who tf is actually scared of editing core files?

Agree x 1
#11
Bybizzyat 4th of November 2017 20:21:15
who tf is actually scared of editing core files?

12 year olds who think it's some special code

Agree x 1
#12
Bybizzyat 4th of November 2017 20:21:15
who tf is actually scared of editing core files?

It's not a case of being scared, it's a case of sustainability. When you edit core files, updating your gamemode is a clusterfuck

Agree x 1
#13
Bydrizzy.vip - cridentat 6th of November 2017 20:39:37
It's not a case of being scared, it's a case of sustainability. When you edit core files, updating your gamemode is a clusterfuck

But then you edit the core files again to fix any errors that occur, next thing you know you have a custom coded gamemode

Agree x 2
#14
Bykanalumaddelaat 6th of November 2017 20:50:35
But then you edit the core files again to fix any errors that occur, next thing you know you have a custom coded gamemode

i hope you're joking

Disagree x 2Optimistic x 1
Users viewing this thread
Nobody