Postado Janeiro 30, 2013 12 anos Então não encontrei nem um sistema de ban 100% funcional e sem erros no forum então resolvi postar o meu pqê vejo varias pessoas pedindo ban system u.u vamo lá . Explicação: Utilização: /ban playername,razão,tempo,comentario exemplo: /ban Skion,1,86.400,Uso Abusivo de bot. Padrão: comprimento: tempo em segundos 1000 Segundos = 16 minutos e 39,6 segundos 1 hora = 3600 segundos Um dia tem 86.400 Segundos, que são equivalentes à 1440 Minutos ou 24 Horas. Uma semana tem 604.800 segundos, que são equivalentes à 10.080 Minutos ou 168 Horas. Um Mês tem 2 milhões e 592 mil segundos, que são equivalentes à 43.200 Minutos ou 720 Horas. Um ano tem 31 Milhões e 536 segundos, que são equivalentes à 525.600 Minutos ou 8.760 Horas. Fonte: froog.com.br - Tudo sobre o Tempo. Comentário: Comentário padrão ou de sua preferencia. razão: número, ler o texto abaixo. Razão (popular): 1-uso de software ilegal. 4-ofensiva declaração, 5-spam, 6-publicidade, 10-bug-abuso, 12-oficial-soft 13-hacking, 14 multi-cliente, 15-conta-trading-ou-sharing, 16-ameaçador-gamemaster, 18-falso-relatório-a-g, 19 comportamento destrutivo, 20-excessiva-injustificada-morte Então o script já manda pra database o nome e tempo do player banido que e passado diretamente para o site onde todos os players poderam vêr na pagina de players banidos contem tambem animação ao player ser banido e etc Data\talkactions\scripts\ban local default = { length = getConfigValue("banLength"), comment = "Rule Violations.", reason = 12 } function getPlayerTesti(cid) local Tiedot = db.getResult("SELECT `id` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1") if Tiedot:getID() ~= LUA_ERROR then local account = Tiedot:getDataInt("id") return account end return LUA_ERROR end function onSay(cid, words, param) local t = string.explode(param, ",") if(not t[1]) then doPlayerSendCancel(cid, "You must enter name.") return true end local player = getPlayerByName(t[1]) if(not isPlayer(player)) then doPlayerSendCancel(cid, "Player with name `" .. t[1] .. "` not found.") return true end local action = t[2] if(not t[2] or (t[2] and type(t[2]) ~= 'string')) then doPlayerSendCancel(cid, "Wrong param.") return true end local length = (t[3] and tonumber(t[3]) > 0) and t[3] or default.length local comment = (t[4] and type(t[4]) == "string") and t[4] or default.comment if(isInArray({"account", "acc", "a"}, action)) then doAddAccountBanishment(getAccountIdByName(t[1]), getPlayerGUID(t[1]), os.time() + length, default.reason, comment, ACTION_BANISHMENT, comment, getPlayerGUID(cid)) result = true --[[ elseif(isInArray({"player", "p"}, action)) then --type missing doAddPlayerBanishment(getPlayerGUID(t[1]), type, os.time() + length, default.reason, ACTION_BANISHMENT, comment, getPlayerGUID(cid)) result = true elseif(isInArray({}, action)) then --ip and mask missing doAddIpBanishment(ip, mask, os.time() + length, default.reason, comment, getPlayerGUID(cid)) result = true elseif(isInArray({}, action)) then doAddNotation(getAccountIdByName(t[1]), getPlayerGUID(t[1]), default.reason, comment, getPlayerGUID(cid)) result = true elseif(isInArray({}, action)) then --channelId missing doAddStatement(getPlayerGUID(t[1]), channelId, default.reason, comment, getPlayerGUID(cid)) result = true ]] end if(result) then db.executeQuery("INSERT INTO `bans` (`id` ,`type` ,`value` ,`param`, `active`, `expires`, `added`, `admin_id`, `comment`, `reason`, `action`) VALUES ('id', '3', '".. getPlayerTesti(player) .."', '45', '1', '".. os.time() + length .."', '".. os.time() .."', '".. getPlayerGUID(cid) .."', '".. comment .."', '12', '2' );") doSendAnimatedText(getCreaturePosition(player), "BANISHED", TEXTCOLOR_RED) doPlayerBroadcastMessage(cid, "The player "..t[1].." has been banished by reason "..t[4].. ". Mais informacoes no site.") doRemoveCreature(player) end return true end Data\talkactions\talkactions.xml <talkaction log="yes" words="/ban" access="4" event="script" value="ban.lua"/> Ban By: Hermes Unban: Data\talkactions\scripts\unban Comandos: /unban playername exemplo: /unban Skion function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local account, tmp = getAccountIdByName(param), true if(account == 0) then account = getAccountIdByAccount(param) if(account == 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player or account '" .. param .. "' does not exists.") return true end tmp = false end local ban = getBanData(account, BAN_ACCOUNT) if(ban and doRemoveAccountBanishment(account)) then local name = param if(tmp) then name = account end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, name .. " has been " .. (ban.expires == -1 and "undeleted" or "unbanned") .. ".") end if(not tmp) then return true end tmp = getIpByName(param) if(isIpBanished(tmp) and doRemoveIpBanishment(tmp)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "IP Banishment on " .. doConvertIntegerToIp(ip) .. " has been lifted.") end local guid = getPlayerGUIDByName(param, true) if(guid == nil) then return true end ban = getBanData(guid, BAN_PLAYER, PLAYERBAN_LOCK) if(ban and doRemovePlayerBanishment(guid, PLAYERBAN_LOCK)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Namelock from " .. param .. " has been removed.") end ban = getBanData(guid, BAN_PLAYER, PLAYERBAN_BANISHMENT) if(ban and doRemovePlayerBanishment(guid, PLAYERBAN_BANISHMENT)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param .. " has been " .. (ban.expires == -1 and "undeleted" or "unbanned") .. ".") end return true end Data\talkactions\talkactions.xml [/font][/b]<talkaction log="yes" words="/unban" access="4" event="script" value="unban.lua"/> Unban By: unknown Então eh isso ai mermo .-. espero ter ajudado alguém Editado Janeiro 30, 2013 12 anos por Fausto32 (veja o histórico de edições) Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.
Postado Janeiro 30, 2013 12 anos Legal, Cade os Creditos ? MSN : [email protected] Skype : Denis.silveiraa
Postado Janeiro 30, 2013 12 anos Autor Olha ai .. puis o do ban lá .. abaixo do script e do unban não tem pqê peguei do meu server e não sei o responsavel por ele .. Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.
Postado Janeiro 30, 2013 12 anos Okay, como eu vi muito nego procurando esse sistema, ent'ao + REP MSN : [email protected] Skype : Denis.silveiraa
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.