@inputs 
@outputs 
@persist [Dc P O]:array Time
@trigger 
interval(1000)
runOnChat(1)
Time = 600000
O = owner():lastSaid():explode(" ")
if(first())
{
    hint("b0unty's jailer V1", 5)
    #hint("Type /time 300 to jail for 30 seconds", 5)
    #hint("Time is pre set at 1 minute", 5) added later
    hint("In order to jail someone type /jail name", 5)
    hint("Type in console wire_expression2_concmd 1", 5)
    hint("time has been pre set to 600 seconds",5 )
}
if(O[1,string]=="/j")
{
    TP = findPlayerByName(O[2,string])
    if(TP:isPlayer())
        {
            Dc:pushEntity(TP)
            P:pushString(O[2,string])
            timer("jailed", Time)
            concmd("ulx freeze " + P[1,string])
            concmd("say /pm " + P[1,string] + " you have been frozen for 600seconds due to rule break")
        }

}
if(Dc[1,entity]:isAdmin())
{
    concmd("ulx unfreeze " + P[1,string])
    selfDestruct()
}

if(clk("jailed"))
{
    concmd("ulx unfreeze " + P[1,string])
    concmd("say /pm " + P[1,string] + " you have been released dont break anymore rules")
    Dc:clear()
    P:clear()
    Time = 600000
}
