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

red skull 10.98 remover

ss1182772

New Member
Joined
Jan 22, 2015
Messages
51
Reaction score
2
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)

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: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

i need added can't use in pz
 
Solution
S
Lua:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
local tile = Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE)
if not tile then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be in protection zone to use this item.")
return true
end
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:remove(1)
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can...
Lua:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
local tile = Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE)
if not tile then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be in protection zone to use this item.")
return true
end
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: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
 
Solution
ty

local config = {
promotion = 1, -- promotion level, default = 1 . Ignore if you don't have new vocations.
minLevel = 20, -- Level needed to buy promotion
cost = 20000, -- Promotion cost in gp
premium = "yes" -- is premium needed to buy promotion?
}

local disabledVocations = {0}
function onSay(cid, words, param)
if(isInArray(disabledVocations, getPlayerVocation(cid)) == TRUE) then
doPlayerSendCancel(cid, "Your vocation cannot buy promotion.")
elseif(config.premium == TRUE and isPremium(cid) == FALSE) then
doPlayerSendCancel(cid, "Voce precisa ser donate para comprar promotion.")
elseif(getPlayerPromotionLevel(cid) >= config.promotion) then
doPlayerSendCancel(cid, "You are already promoted.")
elseif(getPlayerLevel(cid) < config.minLevel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need level " .. config.minLevel .. " to get promotion.")
elseif(doPlayerRemoveMoney(cid, config.cost) ~= TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You do not have enought money! (Promotion cost " .. config.cost .. " gp.")
else
setPlayerPromotionLevel(cid, config.promotion)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been succesful promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
end
return TRUE
end
how fix it to tfs 1.2 10.98

[TFS 1.2] Modal Window Helper Lib

  1. -- The helper lib is used by passing a table value to the ModalWindow function
  2. local window = ModalWindow {
  3. title = 'Title',
  4. message = 'Please, choose the lowest number and press [Ok]'
  5. }

  6. local lowestChoice
  7. for i = 1, 5 do
  8. local value = math.random(1, 100)
  9. -- modalWindow:addChoice() returns the choice object that will be passed to the callbacks
  10. local choice = window:addChoice(value)
  11. -- This way we can pass extra information to the callback
  12. choice.value = value
  13. if not lowestChoice or lowestChoice.value > value then
  14. lowestChoice = choice
  15. end
  16. end

  17. lowestChoice.correct = true

  18. -- Add a button with a specific callback
  19. window:addButton('Ok',
  20. function(button, choice)
  21. if choice.correct then
  22. print('Player selected the correct option.')
  23. else
  24. print('Player selected the incorrect option.')
  25. end
  26. end
  27. )
  28. -- Set this button as the default enter button
    where install this file
  29. window:setDefaultEnterButton('Ok')

  30. -- Add a button without a specific callback
  31. window:addButton('Close')
  32. window:setDefaultEscapeButton('Close')

  33. -- If a button without a specific callback is pressed, this fucntion will be called
  34. window:setDefaultCallback(
  35. function(button, choice)
  36. print('Default callback, button pressed: ' .. button.text .. ' player choice: ' .. choice.text)
  37. end
  38. )

where install this file

TalkAction Offline player to player item trader (Auction System).
TalkAction - Offline player to player item trader (Auction System).
how to use in tfs 1.2
 
Last edited by a moderator:
2. Double Post:
- You have to wait 24 hours to post after your own post in a thread.
- There is 1 exception to this rule. If you solved a problem you can post it with the solution in the thread regardless of the amount of time between your new post and your last one.
If your thread isn't on the first page anymore by the time you solved it, set your thread prefix to solved and edit your first or last post and add the solution.
if you have a different problem create a new thread, do not spam this thread with problems that are unrelated.
 
Back
Top