Ir para conteúdo

Posts Recomendados

Va na Pasta Data/Talckactions/Talckaction.xml e adicione isto:

<talkaction log="yes" words="/ban" access="3" event="script" value="ban.lua"/>

 

Depois Va na Pasta Data/Talckaction/Scripts Crie um Arquivo.LUA renomeie para ban e adicione Isto:

local default_comment = ""

local default_lenght = 1 -- ban time in hours

 

function onSay(cid, words, param)

local parametres = string.explode(param, ",")

if(parametres[1] ~= nil) then

local accId = getAccountIdByName(parametres[1])

if(accId > 0) then

local lenght = default_lenght

local comment = default_comment

if(parametres[2] ~= nil and tonumber(parametres[2]) > 0) then

lenght = tonumber(parametres[2])

end

if(parametres[3] ~= nil) then

comment = parametres[3]

end

doAddBanishment(accId, lenght * 3600, 23, ACTION_BANISHMENT, comment, getPlayerGUID(cid), comment)

local player = getPlayerByNameWildcard(parametres[1])

if(isPlayer(player) == TRUE) then

doRemoveCreature(player)

end

else

doPlayerSendCancel(cid, "Player with name " .. parametres[1] .. " doesn't exist.")

end

else

doPlayerSendCancel(cid, "You must enter name.")

end

return true

end

 

Para usar é bem Facil

/ban Nick,35,AFK BOT - bani o player por 35 hours com o comment de "AFK BOT"

É necessario o Player Estar Offline.

 

Espero Ter Ajudado Abraços

Link para o comentário
https://xtibia.com/forum/topic/117668-resolvidoscript-de-ban/#findComment-773392
Compartilhar em outros sites

Va na Pasta Data/Talckactions/Talckaction.xml e adicione isto:

<talkaction log="yes" words="/ban" access="3" event="script" value="ban.lua"/>

 

Depois Va na Pasta Data/Talckaction/Scripts Crie um Arquivo.LUA renomeie para ban e adicione Isto:

local default_comment = ""

local default_lenght = 1 -- ban time in hours

 

function onSay(cid, words, param)

local parametres = string.explode(param, ",")

if(parametres[1] ~= nil) then

local accId = getAccountIdByName(parametres[1])

if(accId > 0) then

local lenght = default_lenght

local comment = default_comment

if(parametres[2] ~= nil and tonumber(parametres[2]) > 0) then

lenght = tonumber(parametres[2])

end

if(parametres[3] ~= nil) then

comment = parametres[3]

end

doAddBanishment(accId, lenght * 3600, 23, ACTION_BANISHMENT, comment, getPlayerGUID(cid), comment)

local player = getPlayerByNameWildcard(parametres[1])

if(isPlayer(player) == TRUE) then

doRemoveCreature(player)

end

else

doPlayerSendCancel(cid, "Player with name " .. parametres[1] .. " doesn't exist.")

end

else

doPlayerSendCancel(cid, "You must enter name.")

end

return true

end

 

Para usar é bem Facil

/ban Nick,35,AFK BOT - bani o player por 35 hours com o comment de "AFK BOT"

É necessario o Player Estar Offline.

 

Espero Ter Ajudado Abraços

 

 

Ei Tenta Arrumar Pra Mim Para Pode Dar Ban Quando o Player Tiver Off E On... plx

 

 

Flw!!

Link para o comentário
https://xtibia.com/forum/topic/117668-resolvidoscript-de-ban/#findComment-773466
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...