• 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!

Skull Remover problem =/

belier140

New Member
Joined
Apr 7, 2010
Messages
36
Reaction score
2
Well i have a script to remove frags and Red/Black skull when u use it, but im having a problem.... everything works fine, the players get their skull removed and all the frags, but it says that they have black skull.... like This:
00:58 Your black skull will expire at 28 May 2010 17:59:14.

Even when they have 0 frags...

This is the Script im using...
Code:
  local config =  {
                remove_Skulls = true;
                };

function onUse(cid, item, frompos, item2, topos)

  if config.remove_Skulls == TRUE then
     if getPlayerSkullType(cid) > 3 then
       doCreatureSetSkullType(cid, 0)
     end
  end


  db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ");")
  doRemoveItem(item.uid, 1)
  doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Your frags where successfully cleaned.")

  return TRUE  
end

I hope u guys can help me. Thnx in advance ^^
 
you need to add this
Code:
doCreatureSetSkullType(cid,0)

or better use this script :thumbup:
LUA:
function onUse(cid, item, frompos, item2, topos)
       
        local nonremskulls =  -- These are the skulls it cant remove
{
        white = SKULL_WHITE
}

        if isInArray(nonremskulls, getPlayerSkullType(cid)) then
                doPlayerSendCancel(cid,"You can't remove this type of skull.")
                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)
                doPlayerSendTextMessage(cid,27,"Your frags & your skull have been removed, thanks for donating!")
                doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
				doSendAnimatedText(getPlayerPosition(cid), "Removed!", 180)
                doRemoveItem(item.uid, 1)
				doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))

        return TRUE
        end
end
 
Back
Top