• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

red skull remover mod dosent remove red skull...

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
Hey i got this mod that dosent remove the redskull but the frags.
How can i get it to remove the red skull?
im using 0.4 dev
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Frag Remover" version="1.1" author="Hermes" contact="otland.net" enabled="yes">
	<action itemid="2276" event="script"><![CDATA[
		local noRemove = {SKULL_WHITE, 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
		else
			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)
			doRemoveItem(item.uid, 1)
		end
		return true
	]]></action>
</mod>
 
i use fragremover on actions
fragremover.lua
PHP:
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

and in actions.xml
PHP:
	<action itemid="9969" event="script" value="fragremover.lua"/>
and all its work :)
rep me if im help
 
Back
Top