I’m trying to write a simple DarkRP module that gives CP classes 100 armor when they spawn. I whipped up a script in about 2 minutes, but it appears to break everything.
function GM:PlayerSpawn( ply ) job = ply:getDarkRPVar("job") if job == "Civil Protection" or job == "Civil Protection Chief" or job == "Mayor" then ply:SetArmor( 100 ) end end
This code works (CP classes spawn with 100 armor), but it breaks everything else. When players first spawn in after joining the server, they have no items. I have black screen on death enabled, and that doesn’t go away after the player respawns. I’m going to assume I’m doing a whole lot wrong with this script. How do I fix this?