[DarkRP] Need some help with LUA coding

I have many problem so I will make a little list of them. (Yes I did checked google etc etc… If Google give you an answer, I just missed it, sorry if this happen.)

  1. How can I put that when the player HP is equal or less than 10, he become a ragdoll who can take damage. (I have a downloaded addon that allow regeneration)

  2. I would like to know if it’s possible that a person is being shoot at leg get slower?

  3. I would also like to know if it’s possible that a person being shoot on his hand can start shaking, so less accuracy?

[FOUND] 4. I don’t know how to make someone go cook and it put hungermod without anyone doing a command.

[ANSWERED] 5. Can we add job that is available only when there is a lockdown?

Please, if you have an answer for any of these questions, I would really appreciate to hear it out. And sorry about my bad spelling, english is my second language.

  1. [lua]TEAM_MOFO = AddExtraTeam(“Mofo”, Color(80, 45, 0, 255), “models/player/.mdl”, [[XDXDXD]], {“weapon_bugbait”}, “mofo”, 5, 0, 0, false, nil, function() return GetConVarNumber(“DarkRP_Lockdown”) == 1 end)[/lua]

Might work, might not.

Another question: Everyone that is rating dumb, why don’t you come help us instead? I think rating dumb to people that is trying to help useless. They are trying to help.

I will try. Thank for helping

EDIT: I added a false before the other false, and it perfectly work! Thank you. 4 lua question remaining.

REEDIT: I just studied the code you gave me, maybe I can activate hungermod by modifying it a bit, I will try.

Yeah, I was a bit unsure if I missed a false, because I’ve got the same in my edited version, tho I’m not with my PC right now.

I found a way to do the hungermod automatic. Only 3 question left.

Bump.

This is a ugly way of doing it, but you should get the point of it. I can’t test it myself, and there might be some spelling mistakes, as I am using a fucked up computer.

[lua]
function LowerSpeedOnLegHits( pl, hitgroup, dmginfo )

 if hitgroup == HITGROUP_LEFTLEG ||
    hitgroup == HITGROUP_RIGHTLEG then

	pl:SetRunSpeed(50)
    pl:SetWalkSpeed(50)

 end

end

hook.Add(“ScalePlayerDamage”,“LowerSpeedOnLegHits”,LowerSpeedOnLegHits)
[/lua]

That’s look good, I will try it when I will get back at home.