Hello,
I Would like,if leader have addons and member not have,only put outfit without addons.
I Would like,if leader have addons and member not have,only put outfit without addons.
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="party-outfit" version="1.0" author="GarQet" contact="[email protected]" enabled="no">
<config name="party-outfit-config"><![CDATA[
exhaust = 30 -- in seconds
storage = 3002 -- storage value used to save exhaustion
]]></config>
<talkaction words="!gosx" event="script"><![CDATA[
domodlib('party-outfit-config')
local config =
{
exhaustionInSeconds = exhaust,
storage = storage,
sexChangeable = false
}
function onSay(cid, words, param, channel)
if(exhaustion.check(cid, config.storage) == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce so poder usar este comando a cada " .. config.exhaustionInSeconds .. " segundos.")
return TRUE
end
party = getPlayerParty(cid)
if (config.sexChangeable == true) then
sex = getPlayerSex(cid)
end
if (party) then
if (party == cid) then
outfit = getCreatureOutfit(cid)
members = getPartyMembers(party)
if (#members >= 1) then
tmp = outfit
for i=1,#members do
if (config.sexChangeable == true) then
if (sex ~= getPlayerSex(members[i])) then
doPlayerSetSex(members[i], sex)
end
end
doCreatureChangeOutfit(members[i], outfit)
doSendMagicEffect(getCreaturePosition(members[i]), 66)
exhaustion.set(cid, config.storage, config.exhaustionInSeconds)
end
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Este comando so e usado pelos Lideres da party!")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce precisa esta em uma Party!")
end
return true
end
]]></talkaction>
</mod>
Last edited: