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

Black skull remover won't work.

niti

New Member
Joined
Nov 22, 2009
Messages
258
Reaction score
2
Hi everyone:) I'm using tfs 0.3.6! Client 8.6 UNISERVER

I got the script for REDSKULL REMOVER but when I use it with RS it says

(you cant remove this type of skull) Here's my script:

PHP:
function onUse(cid, item, frompos, item2, topos)
 
        local nonremskulls = -- These are the skulls it cant remove. If player has any of these, the rune wont work.
{
        red = SKULL_RED
}
 
        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,4)
                doPlayerSendTextMessage(cid,27,"Your frags & your skull have been removed!")
                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

Is there something I've missed? I'll give rep+!:ninja:
 
Try this:

LUA:
function onUse(cid, item, frompos, item2, topos)
 
    if getPlayerSkullType(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, SKULL_NONE)
        doPlayerSendTextMessage(cid,27,"Your frags & your skull have been removed!")
        doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
        doSendAnimatedText(getPlayerPosition(cid), "Removed!", 180)
        doRemoveItem(item.uid, 1)
    end
	
	return TRUE	
end
 
It checks for red skull, and if a player has a red skull it will get this message: doPlayerSendCancel(cid,"You can't remove this type of skull.")
If you want it for all skulls you can just remove that part, so it will be like this.
LUA:
function onUse(cid, item, frompos, item2, topos)
 
 	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!")
   	doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
     	doSendAnimatedText(getPlayerPosition(cid), "Removed!", 180)
    	doRemoveItem(item.uid, 1)	
        doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid)) 		
        return TRUE	
end
 
Last edited:
Back
Top