no data\talkactions\scripts\jail.lua
function onSay(cid,words,param)jailpos = {x=1017, y=639, z=8}
unjailpos = {x=1013, y=633, z=8}
target = getPlayerByName(param)
local access = getPlayerAccess(cid)
if access >= 3 then
if isPlayer(getPlayerByName(param)) == 1 then
jailer = getPlayerName(cid)
doPlayerSendTextMessage(target,25,'You got jailed by '..jailer..' for 20 minutes then you will be executed.')
doTeleportThing(target,jailpos)
doPlayerSendTextMessage(cid,21,"You just jailed "..param..".")
local a = {cid=cid, target=target, param=param, jailpos=jailpos, unjailpos=unjailpos}
addEvent(onTime,15*60*1000,a)
end
end
end
function onTime(a)
doTeleportThing(a.target,a.unjailpos)
end
-- Posição da Cadeia no seu Mapa
-- Posição Pra onde o Preso vai Quando for Solto(recomendo o templo)
-- Tempo que ele fica preso, está regulado pra 15minutos, para mudar mude o 15 Apenas!
Em Data\talkactions\talkactions.xml:
<talkaction words="/jail" script="jail.lua" />
Créditos do OTFans e eu por repassar