haji h ali
Member
- Joined
- Sep 10, 2013
- Messages
- 59
- Reaction score
- 6
Hello,
can someone add MagicEffect into this script, please. TFS 0.3.6
- ADD THIS
doSendMagicEffect(getPlayerPosition(cid), 27)
doSendAnimatedText(getPlayerPosition(cid), "VIP", TEXTCOLOR_RED)
- INTO THIS
local config = {
txt = 'VIP',
txtColor = TEXTCOLOR_RED,
set = { -- Equipamento que componga el Set.
-- [Slot que ocupa en el Set] = ID del equipamento,
[CONST_SLOT_HEAD] = 7903, -- Helmet
[CONST_SLOT_ARMOR] = 7884, -- Armor
[CONST_SLOT_LEGS] = 7885, -- Legs
[CONST_SLOT_RIGHT] = 8903, -- RIGHT
[CONST_SLOT_FEET] = 9932, -- Boots
},
weapons = {2453,}, -- Posibles weapons que llevará en las manos.
}
local function isUsingSet(pid, set)
if not isPlayerGhost(pid) then
for slot, item_id in pairs(set) do
if getPlayerSlotItem(pid, slot).itemid ~= item_id then
return false
end
end
end
return true
end
function onThink(interval)
for _, name in ipairs(getOnlinePlayers()) do
local pid = getPlayerByName(name)
local pos = getPlayerPosition(pid)
if isUsingSet(pid, config.set) then
if isInArray(config.weapons, getPlayerSlotItem(pid, CONST_SLOT_LEFT).itemid) or isInArray(config.weapons, getPlayerSlotItem(pid, CONST_SLOT_RIGHT).itemid) then
doSendAnimatedText(pos, config.txt, config.txtColor)
end
end
end
return true
end
can someone add MagicEffect into this script, please. TFS 0.3.6
- ADD THIS
doSendMagicEffect(getPlayerPosition(cid), 27)
doSendAnimatedText(getPlayerPosition(cid), "VIP", TEXTCOLOR_RED)
- INTO THIS
local config = {
txt = 'VIP',
txtColor = TEXTCOLOR_RED,
set = { -- Equipamento que componga el Set.
-- [Slot que ocupa en el Set] = ID del equipamento,
[CONST_SLOT_HEAD] = 7903, -- Helmet
[CONST_SLOT_ARMOR] = 7884, -- Armor
[CONST_SLOT_LEGS] = 7885, -- Legs
[CONST_SLOT_RIGHT] = 8903, -- RIGHT
[CONST_SLOT_FEET] = 9932, -- Boots
},
weapons = {2453,}, -- Posibles weapons que llevará en las manos.
}
local function isUsingSet(pid, set)
if not isPlayerGhost(pid) then
for slot, item_id in pairs(set) do
if getPlayerSlotItem(pid, slot).itemid ~= item_id then
return false
end
end
end
return true
end
function onThink(interval)
for _, name in ipairs(getOnlinePlayers()) do
local pid = getPlayerByName(name)
local pos = getPlayerPosition(pid)
if isUsingSet(pid, config.set) then
if isInArray(config.weapons, getPlayerSlotItem(pid, CONST_SLOT_LEFT).itemid) or isInArray(config.weapons, getPlayerSlotItem(pid, CONST_SLOT_RIGHT).itemid) then
doSendAnimatedText(pos, config.txt, config.txtColor)
end
end
end
return true
end
Last edited: