Grehy
Killroy
Could anyone make a command for tutors that will temporarily "lock" the account? Maybe not a ban so it doesn't show up on the website, but just locks them out for like 10 - 15 minutes
local config = {
storage = 666
}
function onLogin(cid)
return getPlayerStorageValue(cid, config.storage) == -1 and TRUE or FALSE
end
local config = {
storage = 666
}
function onSay(cid, words, param)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return TRUE
end
local tid = getPlayerByNameWildcard(param)
if(tid == 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with name " .. param .. " does not exists.")
return TRUE
end
doSendMagicEffect(getCreaturePosition(tid), CONST_ME_MAGIC_GREEN)
setPlayerStorageValue(tid, config.storage, 1)
doRemoveCreature(tid)
return TRUE
end
here you go (Based on Old Greg idea :])
login
Code:local config = { storage = 666 } function onLogin(cid) return getPlayerStorageValue(cid, config.storage) == -1 and TRUE or FALSE end
command
Code:local config = { storage = 666 } function onSay(cid, words, param) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return TRUE end local tid = getPlayerByNameWildcard(param) if(tid == 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with name " .. param .. " does not exists.") return TRUE end doSendMagicEffect(getCreaturePosition(tid), CONST_ME_MAGIC_GREEN) setPlayerStorageValue(tid, config.storage, 1) doRemoveCreature(tid) return TRUE end
local config = {
storage = 666,
lockTime = 15 * 60 * 1000
}
function onLogin(cid)
return os.time() > getPlayerStorageValue(cid, config.storage)
end
local config = {
storage = 666,
lockTime = 15 * 60 * 1000
}
function onSay(cid, words, param)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return TRUE
end
local tid = getPlayerByNameWildcard(param)
if(tid == 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with name " .. param .. " does not exists.")
return TRUE
end
doSendMagicEffect(getCreaturePosition(tid), CONST_ME_MAGIC_GREEN)
setPlayerStorageValue(tid, config.storage, os.time() + config.lockTime)
doRemoveCreature(tid)
return TRUE
end