Ir para conteúdo

Featured Replies

Postado

Cara não tem como não funcionar.

 

Siga os procedimentos
cria um arquivo .lua com o nome removefrags na pasta data/talkactions/scripts, cole:


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


em talkactions.xml cole a tag:
<talkaction words="!removefrags" event="script" value="removefrags.lua"/>
  • Respostas 7
  • Visualizações 482
  • 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
  • Autor

Cara não tem como não funcionar.

 

Siga os procedimentos

cria um arquivo .lua com o nome removefrags na pasta data/talkactions/scripts, cole:


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

em talkactions.xml cole a tag:

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

 

fiz o  procedimento, dei reload e nada, tem skype para nos conversarmoss? irei testar apos reiniciar o servidor.

Postado

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

 

-- [( Script created by Luquinha for TK )] --
function onUse(cid, item, fromPosition, item2, toPosisition)
local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK}
if isInArray(rskulls, getPlayerSkullType(cid)) then
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
end

Agora volte até a pasta "Actions" e abra o arquivo "Actions.xml" e adicione esta Tag nele

        <action itemid="5468" event="script" value="RemoveFrags.lua"/>

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

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