Ir para conteúdo

Featured Replies

Postado

Sobre: É para remover certa quantidade de frags o jogador, a maioria dos script de clean frag removia todos =/

function doPlayerRemoveFrag(cid, count) -- by vodka

local query,t,k = db.getResult("SELECT `kill_id` FROM `player_killers` WHERE `player_id` = "..getPlayerGUID(cid)),{},0

if (query:getID() ~= -1) then

repeat

local gs = db.getResult("SELECT `unjustified` FROM `killers` WHERE `id` = "..query:getDataInt("kill_id"))

if (gs:getDataInt("unjustified") ~= 0) then

table.insert(t, query:getDataInt("kill_id"))

k = k +1

end

until not query:next() or k >= count  

query:free()

end

for _, frag in pairs(t) do

db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` = "..frag)

end

return true

end
uma talk de exemplo:
function onSay(cid, words, param, channel)

local amount = 2

if getPlayerFrags(cid) < amount then

doPlayerSendCancel(cid,"You don't remover your frags.") return true

end

doPlayerRemoveFrag(cid, amount)

doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)

doSendMagicEffect(getPlayerPosition(cid), 26)

return true

end

  • 1 month later...
  • 3 weeks later...

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo