• How do I set custom HP for different jobs?
    6 replies, posted
I own a kingdomRP server and I need custom hp for a donator job (Dragon) What is the code for this??
[url]http://forum.darkrp.com/threads/custom-jobs-hp-speed.1395/[/url]
[QUOTE=ST3BL;50029100][url]http://forum.darkrp.com/threads/custom-jobs-hp-speed.1395/[/url][/QUOTE] I only want the hp not the speed tho
[QUOTE=RL_STARK;50029207]I only want the hp not the speed tho[/QUOTE] Put this in the job you want to set the health for. Change '250' to what you want their health to be set to. Most of the time people won't "spoon feed" you code, it might help to look at the [URL="http://wiki.garrysmod.com"]Garry's Mod Wiki[/URL] next time. [CODE] PlayerSpawn = function(ply) ply:SetHealth(250) ply:SetMaxHealth(250) return CLIENT end [/CODE]
[QUOTE]PlayerSpawn = function(ply) ply:SetArmor(100) end, or PlayerSpawn = function(ply) ply:SetHealth(100) end,[/QUOTE]
[QUOTE=MexicanR;50029238]Put this in the job you want to set the health for. Change '250' to what you want their health to be set to. Most of the time people won't "spoon feed" you code, it might help to look at the [URL="http://wiki.garrysmod.com"]Garry's Mod Wiki[/URL] next time. [CODE] PlayerSpawn = function(ply) ply:SetHealth(250) return CLIENT end [/CODE][/QUOTE] You should prob also add ply:SetMaxHealth(250) if you want the health to be healed up to 250 with medkits and stuff like that.
[QUOTE=Blinkenn;50030377]You should prob also add ply:SetMaxHealth(250) if you want the health to be healed up to 250 with medkits and stuff like that.[/QUOTE] Totally overlooked that, thanks for noticing! I have changed my code example to fix this.
Sorry, you need to Log In to post a reply to this thread.