General > Developers Corner

Help me. I need to make one function...

(1/1)

Aimatt:
I want to make a jail room, but I have a problem, I want to make sure that when a person is sentenced, the player is given the Banned privilege and after the elapsed time the privilege that was before the punishment was returned.

iViscosity:
Have you started anything? What do you have so far? What part do you not know how to do?

Aimatt:
I have already changed my mind about doing it through privilege since there is enough job (if I have darkrp mode) now I don’t know how to make the player who was put in jail give mute and gag ...

Aimatt:
function JailRoom(ply, reason, seconds, after_relog)
   
   if ply.jailed == true then return end
   ply.LastPos = ply:GetPos()
   ply.jailed = true
   ply.timer = seconds
   ply.jail_reason = reason
   timer.Simple(1,function ()
      ply:SetTeam(2)
      ply:changeTeam(TEAM_BAN, true)
      ply:SetHealth( "100" )
   end)
   timer.Simple(15,function ()
      ply:Say( "/job ban", false )
      
   end)

Aimatt:
Sorry for maybe bad translate...

Navigation

[0] Message Index

Go to full version