Ir para conteúdo
  • 0

Mycry

Pergunta

[Resolvido]Olá,tenho um script de remove frags mas quando uso ele ,ele não some da backpack.

Como faz para ele sumir apos usar?

 

 

 

 

function onUse(cid, topos, item, item2, frompos)
local nonremskulls = {red = SKULL_RED, white = SKULL_WHITE, black = SKULL_BLACK}
if getPlayerStorageValue(cid,1800) == 10 then
doCreatureSay(cid, "You can not remove your frags and their skulls.", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 10 then
doCreatureSay(cid, "Your Frags were successfully removed.", TALKTYPE_ORANGE_1)
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid,0)
doSendMagicEffect(fromPosition, 37)
doRemoveItem(item.uid)
setPlayerStorageValue(cid,1800,20)
return TRUE
else
doCreatureSay(cid, "Only people level 10 can use this item.", TALKTYPE_ORANGE_1)
end
end
end
Editado por Mycry
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Tenta assim:

 

function onUse(cid, item, fromPosition, item2, toPosition)
 
local nonremskulls = {red = SKULL_RED, white = SKULL_WHITE, black = SKULL_BLACK}
 
if getPlayerStorageValue(cid,1800) == 10 then
doCreatureSay(cid, "You can not remove your frags and their skulls.", TALKTYPE_ORANGE_1)
 
else if getPlayerLevel(cid) >= 10 then
doCreatureSay(cid, "Your Frags were successfully removed.", TALKTYPE_ORANGE_1)
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid,0)
doSendMagicEffect(fromPosition, 37)
doRemoveItem(item.uid, 1)
setPlayerStorageValue(cid,1800,20)
return TRUE
else
doCreatureSay(cid, "Only people level 10 can use this item.", TALKTYPE_ORANGE_1)
end
end
end
Editado por zipter98
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...