How do you add hp to certain classes?
Im making a starwars rp and I really need to know
Certain Classes HP
-
- New to forums
- Posts: 1
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Thu Dec 01, 2016 8:22 pm
Re: Certain Classes HP
Heres and example of a job I have with custom HP.
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(255, 0, 0, 255),
model = {"models/player/Combine_Soldier.mdl"},
description = [[You are a police officer. You have to enforce the laws.]],
weapons = {"weapon_cuff_police", "m9k_scoped_taurus", "weaponchecker", "arrest_stick", "stunstick", "unarrest_stick"},
command = "chief",
max = 1,
salary = 115,
admin = 0,
vote = true,
hasLicense = false,
candemote = false,
category = "Civil Protection",
PlayerSpawn = function(ply)
ply:SetHealth(115)
ply:SetMaxHealth(115)
end,
})
All you need to do is add that player spawn stuff after the category/candemote or whatever is your last thing and then change the number around for example if you wanted them to have 750 HP you make ply:SetHealth(115) to ply:SetHealth(750) and same thing for SetMaxHealth (ply:SetMaxHealth(115) to ply:SetMaxHealth(750) )
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(255, 0, 0, 255),
model = {"models/player/Combine_Soldier.mdl"},
description = [[You are a police officer. You have to enforce the laws.]],
weapons = {"weapon_cuff_police", "m9k_scoped_taurus", "weaponchecker", "arrest_stick", "stunstick", "unarrest_stick"},
command = "chief",
max = 1,
salary = 115,
admin = 0,
vote = true,
hasLicense = false,
candemote = false,
category = "Civil Protection",
PlayerSpawn = function(ply)
ply:SetHealth(115)
ply:SetMaxHealth(115)
end,
})
All you need to do is add that player spawn stuff after the category/candemote or whatever is your last thing and then change the number around for example if you wanted them to have 750 HP you make ply:SetHealth(115) to ply:SetHealth(750) and same thing for SetMaxHealth (ply:SetMaxHealth(115) to ply:SetMaxHealth(750) )