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

Lua Rs remover

Zool

Banned User
Joined
Jun 9, 2009
Messages
742
Reaction score
5
Location
Poland/St Wola
Code:
local config =
{
    item = 9999,  -- WPISZ ID ITEMA KTÓRY MA USUWAĆ FRAGI PRAWYM KLIKNIĘCIEM 
    level = 1, -- Wpisz minimalny level do uzycia
    count = 0
}
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= config.level then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Twoje fragi zostaly usuniete.")
        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_RED)  
        doPlayerSetSkullEnd(cid, 0, SKULL_BLACK) 
    else
        doPlayerSendCancel(cid, "Nie masz odpowiedniego poziomu")
    end
    return TRUE
end

How edit that to dont remover Skulls ? Remove Only Frags

Or second idea to can use only in Pz Zone ?

Ofc rep++
 
Lua:
local config =
{
	OnlyUseInPz = true -- false or true
}
function onUse(cid, item, frompos, item2, topos)
if(config.OnlyUseInPz) and (getTilePzInfo(getPlayerPosition(cid))) then                                     
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Twoje fragi zostaly usuniete.")
        doRemoveItem(item.uid)
        db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
    else
        doPlayerSendCancel(cid, "You can remove your frags only in protection zone.")
    end
    return true
end
 
Back
Top