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

Frag remover [only 1 use, you use it and desapears]

wafuboe

Active Member
Joined
Dec 24, 2010
Messages
884
Solutions
2
Reaction score
26
well as the title say i need a skull remover for only one use, it you have a red skull or a
black skull you use it on yourself and it desepears the skull remover and the skull.


thanks :)
 
Last edited:
You need to use the search engine... There is an item called Black Skull, many servers use it to do the thing you are saying.... The script is published somewhere... Sorry for not post the script but i'm not in my pc where i have my servers
 
ok heres the script...

-- Scripted by Leon Zawodowiec / Mag Egzorcysta --
function onUse(cid, item, frompos, item2, topos)
local skull = getCreatureSkullType(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, 9969, 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, 9969, 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

if i wannna make the skull remover with only 1 charge and then the skull remover desapear i edit it in items.xml or maybe i have to add something in this script ?
if someone can modify this script so it can only have one charge and then deseapear :)
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local skull = getCreatureSkullType(cid)
	if skull < SKULL_RED then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You can only remove red or black skull.')
	else
		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)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Your ' .. (skull == SKULL_RED and 'Red' or 'Black') .. ' Skull has been removed!')
	end
	return true
end
 
Back
Top