Hello Otlanders, Ive got a Jail script but i wanted to ask
if somebody might edit it so ...
1.when you say /jail *playername* it jails that person.
2. Randomly picks a position to teleport the person to
3. unjails after .10 mins time (default)
I would be very Please and ill REP++ for Help
if somebody might edit it so ...
1.when you say /jail *playername* it jails that person.
2. Randomly picks a position to teleport the person to
3. unjails after .10 mins time (default)
I would be very Please and ill REP++ for Help
Lua:
--[[
OTLAND.NET / CREDITS
CREATED BY:
master-m
EDITED BY:
Lithium: Shorten.
Velik: Missing parts. Tested code.
Colandus: Missing end. Works for both TFS and Evolutions. Added more "checks". Shorten alot.
]]
local jpos = {
[1] = {x = 1102, y = 824, z = 7},
[2] = {x = 1102, y = 824, z = 7},
[3] = {x = 1102, y = 824, z = 7},
[4] = {x = 1102, y = 824, z = 7},
[5] = {x = 1102, y = 824, z = 7},
[6] = {x = 1102, y = 824, z = 7},
[7] = {x = 1102, y = 824, z = 7},
[8] = {x = 1102, y = 824, z = 7},
[9] = {x = 1102, y = 824, z = 7},
[10] = {x = 1151, y= 874, z = 7}
}
function onSay ( cid, words, param )
grouprequired = 4
jailedstoragevalue = 1338
unjailpos = { x = 876, y = 1025, z = 7 }
if words == '/jail' then
if getPlayerGroupId ( cid ) >= grouprequired and param ~= "" and getPlayerStorageValue ( getPlayerByName ( param ), jailedstoragevalue ) == -1 then
jailer = getPlayerName ( cid )
doTeleportThing(isplayer, jpos, TRUE)
doPlayerSendTextMessage ( getPlayerByName ( param ), 25, 'You have been jalied by '..jailer..'' )
doPlayerSendTextMessage ( cid, 21, "You just jailed "..param.."." )
setPlayerStorageValue ( getPlayerByName ( param ), jailedstoragevalue, 1 )
elseif getPlayerGroupId ( cid ) < grouprequired then
doPlayerSendTextMessage ( cid, 21, "You don't have access to unjail other players." )
elseif getPlayerStorageValue ( getPlayerByName ( param ), jailedstoragevalue ) ~= -1 then
doPlayerSendTextMessage ( cid, 21, "This Player is already jailed." )
else
doPlayerSendTextMessage ( cid, 21, "You need to fill in a playername!" )
end
elseif words == '/unjail' then
if getPlayerGroupId ( cid ) >= grouprequired and param ~= "" and getPlayerStorageValue ( getPlayerByName ( param ), jailedstoragevalue ) == 1 then
unjailer = getPlayerName ( cid )
doTeleportThing ( getPlayerByName ( param ), unjailpos, 0 )
doPlayerSendTextMessage ( getPlayerByName ( param ), 25, 'You have been unjailed by '..unjailer..'' )
doPlayerSendTextMessage ( cid, 21,"You just unjailed "..param.."." )
setPlayerStorageValue ( getPlayerByName ( param ), jailedstoragevalue, -1 )
elseif getPlayerGroupId ( cid ) < 4 then
doPlayerSendTextMessage ( cid, 21, "You cannot unjail someone!" )
elseif getPlayerStorageValue ( getPlayerByName ( param ), jailedstoragevalue ) ~= 1 then
doPlayerSendTextMessage ( cid, 21, "This Player is already unjailed." )
else
doPlayerSendTextMessage ( cid, 21, "You need to fill in a playername!" )
end
end
e
Last edited by a moderator: