Code:local config = { looktype = 71, lookhead = 20, lookbody = 0, looklegs = 40, lookaddons = 1, duration = 30 } local outfit = createConditionObject(CONDITION_OUTFIT) setConditionParam(outfit, CONDITION_PARAM_TICKS, config.duration*1000) addOutfitCondition(outfit, {lookType = config.looktype, lookHead = config.lookhead, lookBody = config.lookbody, lookLegs = config.looklegs, lookFeet = config.looklegs, lookAddons = config.lookaddons}) function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 52315) > 0 then doAddCondition(cid, outfit) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) else doPlayerSendCancel(cid, "Sorry, not possible.") end return true end
Hello Guys,
I'm using tfs 0.4.
Why this script not work?
Code:
local duration = 30
local NewOutfit = {looktype=71,lookhead=20,lookbody=0,looklegs=40,lookfody=30,lookaddons=1}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 52315) > 0 then
doSetPlayerOutfit(cid, NewOutfit, duration*1000)
doSendMagicEffect(toPosition,CONST_ME_MAGIC_BLUE)
return true
end
end
Last edited: