adrianootavares
New Member
script urgent plz
Ring Double EXP tfs 1.0 PLZ!
also
Remove Frags! tfs 1.0 PLZ!
Ring Double EXP tfs 1.0 PLZ!
also
Remove Frags! tfs 1.0 PLZ!
function onUse(cid, item, frompos, item2, topos)
local skull = getPlayerSkullType(cid)
if skull == SKULL_NONE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have any skull !")
return 0
end
if skull == SKULL_YELLOW then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove yellow skull !")
return 0
end
if skull == SKULL_GREEN then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove green skull !")
return 0
end
if skull == SKULL_WHITE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove white skull !")
return 0
end
if skull == SKULL_RED then
(doPlayerRemoveItem(cid, 99999, 1) == TRUE)
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Red Skull has been removed !")
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
return 0
else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Take your Frag Remover to your BackPack !")
return 0
end
if skull == SKULL_BLACK then
(doPlayerRemoveItem(cid, 99999, 1) == TRUE)
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Black Skull has been removed !")
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
return 0
else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Take your Frag Remover to your BackPack !")
return 0
end
end
<action itemid="99999" event="script" value="skull.lua"/>
Script which will remove rs or bs, try it. Change 99999 to your item id.
Code:function onUse(cid, item, frompos, item2, topos) local skull = getPlayerSkullType(cid) if skull == SKULL_NONE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have any skull !") return 0 end if skull == SKULL_YELLOW then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove yellow skull !") return 0 end if skull == SKULL_GREEN then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove green skull !") return 0 end if skull == SKULL_WHITE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove white skull !") return 0 end if skull == SKULL_RED then (doPlayerRemoveItem(cid, 99999, 1) == TRUE) doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Red Skull has been removed !") db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") return 0 else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Take your Frag Remover to your BackPack !") return 0 end if skull == SKULL_BLACK then (doPlayerRemoveItem(cid, 99999, 1) == TRUE) doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Black Skull has been removed !") db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") return 0 else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Take your Frag Remover to your BackPack !") return 0 end end
Code:<action itemid="99999" event="script" value="skull.lua"/>
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
if isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) then
player:setSkull(SKULL_NONE)
player:setSkullTime(0)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!")
db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName()))
Item(item.uid):remove(1)
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) then player:setSkull(SKULL_NONE) player:setSkullTime(0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!") db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName())) Item(item.uid):remove(1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!") player:getPosition():sendMagicEffect(CONST_ME_POFF) end return true end