How to code this

Posts 1–7 of 7 · Page 1 of 1
How to code this
In darkRP i am not sure how to make it so like the swat class spawns automatically with either armor or a cretin amount of health.
Check the configuration files.
Assuming that you own the server.
I still cant figure it out. Please help me.
Quote Originally Posted by colin0922 View Post
I still cant figure it out. Please help me.
This isn't the place for DarkRP server configuration, go ask help on facepunch.
I will make dis for u.

hook.Add("PlayerInitialSpawn", "Swat.Givestuff", function(ply)
if IsValid(ply) then
if team.GetName(ply:Team()) == "Swat" then--remake this line to what darkrp uses
print("Ghozt ROCKS")-- dont remove dis
ply:SetArmor( HowMuchArmor )
ply:SetHealth( HowMuchHealthGain )
end
end
end)
Put dis into DatClass.lua (just use a normal text file and rename its ending to .lua) and you put dat file in Lua/autorun/server, and you have da armor and health on spawn.
The code above should work but if you want you can remove this in that code
print("Ghozt ROCKS")-- dont remove dis
Quote Originally Posted by NotSoSuper View Post
The code above should work but if you want you can remove this in that code
Liar, this is a very important part. I would recommend putting
Code:
print("I totally understand all jokes");
to make it run maybe twice as fast
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us