• 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!

Ban script!

fesuko

New Member
Joined
Apr 7, 2008
Messages
56
Reaction score
0
Hey guys!
I need a script for ban players!
Like, an Talkaction, that works like that:
/ban PLAYER, 9 (Days)
/ban PLAYER, 8 (Days)
/ban PLAYER, 7 (Days)
/ban PLAYER, 6 (Days)


Can some one help me with that? Becouse i dont know why, but the rule violation is mission now in my server o0, maybe i changed something in database :p
Cya!
Rep++!
 
talkactions/scripts/
Create:
ban.lua

PHP:
local Comentario = "Ban temporal de dias."
function onSay(cid, words, param)
	if getPlayerAccess(cid) >= 4 then
		if #param > 0 then
			local data = string.explode(param, ",")
			if not getPlayerByName(data[1]) then
				doPlayerSendCancel(cid, "Ingresa el nombre del jugador.")
			elseif tonumber(data[2]) == nil then
				doPlayerSendCancel(cid, "Ingresa la cantidad de dias.")
			else
				local name, dias = getPlayerByName(data[1]), tonumber(data[2])
				doAddBanishment(getPlayerAccountId(name), dias * 24 * 60 * 60, 19, 2, Comentario, getPlayerGUID(cid))
				doRemoveCreature(name)
			end
		else
			doPlayerSendCancel(cid, "Ingresa los datos necesarios.")
		end
	end
	return TRUE
end

talkactions/talkactions.xml
PHP:
<talkaction words="/ban" log="yes" access="4" script="ban.lua"/>


/ban playername, days

Player must be online.
 
Back
Top