im using the lates rev arthur for the last time last rev
anco i dont want frag remover i want rs remover that removes frags also!
im using the lates rev arthur for the last time last rev
anco i dont want frag remover i want rs remover that removes frags also!
local config =
{
item = 2276,
level = 1,
count = 1
}
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= config.level then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your frags have been removed.")
doRemoveItem(item.uid)
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doPlayerSetSkullEnd(cid, 0, SKULL_RED)
doPlayerSetSkullEnd(cid, 0, SKULL_BLACK)
else
doPlayerSendCancel(cid, "You dot have enough level")
end
return TRUE
end
function onUse(cid, item, frompos, item2, topos)
if isPlayer(topos.uid) then
doPlayerSendTextMessage(topos.uid, MESSAGE_INFO_DESCR, "Your frags have been removed.")
doRemoveItem(item.uid)
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(topos.uid) .. ")")
doCreatureSetSkullType(topos.uid, 0)
doPlayerSetSkullEnd(topos.uid, 0, SKULL_RED)
doPlayerSetSkullEnd(topos.uid, 0, SKULL_BLACK)
end
return true
end
function onUse(cid, item, frompos, item2, topos)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your frags have been removed.")
doRemoveItem(item.uid)
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doPlayerSetSkullEnd(cid, 0, SKULL_RED)
doPlayerSetSkullEnd(cid, 0, SKULL_BLACK)
return true
end
function onUse(cid, item, frompos, item2, topos)
if isPlayer(topos.uid) then
doPlayerSendTextMessage(topos.uid, MESSAGE_INFO_DESCR, "Your frags have been removed.")
doRemoveItem(item.uid)
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(topos.uid) .. ")")
doCreatureSetSkullType(topos.uid, 0)
doPlayerSetSkullEnd(topos.uid, 0, SKULL_RED)
doPlayerSetSkullEnd(topos.uid, 0, SKULL_BLACK)
end
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureSkullType(cid) == SKULL_RED then
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid,0)
doPlayerSendTextMessage(cid,27,"Your frags and skull have been removed!")
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
doRemoveItem(item.uid, 1)
doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))
else
doPlayerSendCancel(cid, "You do not have a red skull.")
doSendMagicEffect(getPlayerPosition(cid),2)
end
return TRUE
end