ULX

Author Topic: Help me. I need to make one function...  (Read 525 times)

0 Members and 2 Guests are viewing this topic.

Offline Aimatt

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Help me. I need to make one function...
« 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.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 786
  • Karma: 54
Re: Help me. I need to make one function...
« Reply #1 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?
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Discord

Offline Aimatt

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Help me. I need to make one function...
« Reply #2 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 ...
« Last Edit: October 08, 2019, 10:55:41 PM by Aimatt »

Offline Aimatt

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Help me. I need to make one function...
« Reply #3 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)

Offline Aimatt

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Help me. I need to make one function...
« Reply #4 on: October 08, 2019, 10:56:31 PM »
Sorry for maybe bad translate...