• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[REQUEST] Temporary ban for tutors

Grehy

Killroy
Joined
Nov 21, 2008
Messages
2,631
Reaction score
33
Location
United States
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
 
Well you could make them have acces just to do a Normal Ban? not a FinalBan?

Example:

Code:
banLength = 1 * 24 * 60 * 60
finalBanLength = 7 * 24 * 60 * 60
 
you could just make it a creature event. give them a storage value and remove the player. onLogin it checks if they have that storage value, if so it returns false.
 
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
 
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

Doesn't do anything except kick and set storage value? :confused:
 
yep : (

Here you have with lock time:
Code:
local config = {
	storage = 666,
	lockTime = 15 * 60 * 1000
}

function onLogin(cid)
	return os.time() > getPlayerStorageValue(cid, config.storage)
end

Code:
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
 
Back
Top