Ulysses

General => Developers Corner => Topic started by: Aimatt on October 08, 2019, 07:23:38 AM

Title: Help me. I need to make one function...
Post by: Aimatt on October 08, 2019, 07:23:38 AM
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.
Title: Re: Help me. I need to make one function...
Post by: iViscosity on October 08, 2019, 07:42:37 AM
Have you started anything? What do you have so far? What part do you not know how to do?
Title: Re: Help me. I need to make one function...
Post by: Aimatt on October 08, 2019, 10:52:21 PM
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 ...
Title: Re: Help me. I need to make one function...
Post by: Aimatt on October 08, 2019, 10:53:50 PM
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)
Title: Re: Help me. I need to make one function...
Post by: Aimatt on October 08, 2019, 10:56:31 PM
Sorry for maybe bad translate...