Ir para conteúdo

Featured Replies

Postado

quero um script que quando eu digito !removefrags ele REMOVE TODOS OS FRAGS, e deixando seu frag zerado, pronto para matar denovo. para versao 8.60

e para retirar os frags custaria uns 100k

Editado por Tiago6795 (veja o histórico de edições)

  • Respostas 7
  • Visualizações 501
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Usa action, dá na mesma apenas use um NPC para vende o item. Vá até a pasta "Actions" entre na pasta "Script" e crie um arquivo com o nome de RemoveFrags.lua com isto dentro dele   Agora vo

Postado

tenta ai ? nem tentei

 


removefrags.lua
function onSay(cid, words, param)

local quantMoney = 5000 -- quantidade de gps
local noRemove = {SKULL_YELLOW}
local playerSkull = getPlayerSkullType(cid)

if isInArray(noRemove, playerSkull) then
doPlayerSendCancel(cid, "You can't remove this type of skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
elseif playerSkull == SKULL_NONE then
doPlayerSendCancel(cid, "You don't have skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
elseif not doPlayerRemoveMoney(cid, quantMoney) then
doPlayerSendCancel(cid, "You do not have money.")
return true
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doPlayerSendTextMessage(cid, 27, "Your frags & your skull have been removed!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180)
doCreatureSetSkullType(cid,0)
doPlayerSetSkullEnd(cid, 0, playerSkull)
end

return true
end


talkactions.xml


<talkaction words="!removefrags" event="script" value="removefrags.lua"/>

Editado por Luquinha (veja o histórico de edições)

Dp9Y7vq.png

Postado
  • Autor

tenta ai ? nem tentei

 

removefrags.lua

function onSay(cid, words, param, channel)
local config = {
price = 10000,
amount = 1
}
if getPlayerFrags(cid) < config.amount then
doPlayerSendCancel(cid,"você não tem frags suficientes para executar está ação.") return true
elseif not doPlayerRemoveMoney(cid, config.price) then
doPlayerSendCancel(cid,"você precisa ter "..config.price.." gps para remover seus frags.") return true
end
doPlayerRemoveFrag(cid, config.amount)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Parabéns! Foram removidos "..config.amount.." frags.")
doSendMagicEffect(getPlayerPosition(cid), 26)
return true
end

talkactions.xml

<talkaction words="/removefrags;!removefrags" event="script" value="removefrags.lua"/>

 

 

irei testar , edit jaja !

 

@nao funcionou =\

Editado por Tiago6795 (veja o histórico de edições)

Postado

tenta ai ? nem tentei , OBS : é outro

 

removefrags.lua

function onSay(cid, words, param)

local quantMoney = 5000 -- quantidade de gps
local noRemove = {SKULL_YELLOW}
local playerSkull = getPlayerSkullType(cid)

if isInArray(noRemove, playerSkull) then
doPlayerSendCancel(cid, "You can't remove this type of skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
elseif playerSkull == SKULL_NONE then
doPlayerSendCancel(cid, "You don't have skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
elseif not doPlayerRemoveMoney(cid, quantMoney) then
doPlayerSendCancel(cid, "You do not have money.")
return true
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doPlayerSendTextMessage(cid, 27, "Your frags & your skull have been removed!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180)
doCreatureSetSkullType(cid,0)
doPlayerSetSkullEnd(cid, 0, playerSkull)
end

return true
end
 

 



talkactions.xml


 

 

<talkaction words="!removefrags" event="script" value="removefrags.lua"/>
 

 

Editado por Luquinha (veja o histórico de edições)

Dp9Y7vq.png

Postado
  • Autor

tenta ai ? nem tentei , OBS : é outro

 

removefrags.lua

function onSay(cid, words, param)

local quantMoney = 5000 -- quantidade de gps
local noRemove = {SKULL_YELLOW}
local playerSkull = getPlayerSkullType(cid)

if isInArray(noRemove, playerSkull) then
doPlayerSendCancel(cid, "You can't remove this type of skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
elseif playerSkull == SKULL_NONE then
doPlayerSendCancel(cid, "You don't have skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
elseif not doPlayerRemoveMoney(cid, quantMoney) then
doPlayerSendCancel(cid, "You do not have money.")
return true
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doPlayerSendTextMessage(cid, 27, "Your frags & your skull have been removed!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180)
doCreatureSetSkullType(cid,0)
doPlayerSetSkullEnd(cid, 0, playerSkull)
end

return true
end
 

 

talkactions.xml

 

 

<talkaction words="!removefrags" event="script" value="removefrags.lua"/>
 

 

 

 

Nada :/ troco o script e do reload talkactions  e nada.

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