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

Exhausted talkaction!

GOD Kubus

New Member
Joined
Dec 23, 2012
Messages
60
Reaction score
0
i make exhausted in script and dont work...
Code:
local config = 
{
    exhaustionInSeconds = 30,
    storage = 34534,
sexChangeable = false
}

function onSay(cid, words, param, channel)
    if(exhaustion.check(cid, config.storage) == TRUE) then
        doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustionInSeconds .. " seconds.")
        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 

local tmpOutfit = getCreatureOutfit(members[i])
            tmpOutfit.lookHead = outfit.lookHead
            tmpOutfit.lookBody = outfit.lookBody
            tmpOutfit.lookLegs = outfit.lookLegs
            tmpOutfit.lookFeet = outfit.lookFeet
            tmpOutfit.lookLegs = outfit.lookLegs


doCreatureChangeOutfit(members[i], tmpOutfit)
doSendMagicEffect(getCreaturePosition(members[i]), 66)
end
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This command can use only leader of a party!")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must be in a party!")
end
return true
end
 
Code:
local cdtime = 30
local config =
{
sexChangeable = false
}

function onSay(cid, words, param, channel)
    if getPlayerStorageValue(cid, 77889) >= os.time() then
        doPlayerSendCancel(cid, "You can change the outfit once every 30 seconds.")
        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)) then
doPlayerSetSex(members, sex)
end
end

local tmpOutfit = getCreatureOutfit(members)
            tmpOutfit.lookHead = outfit.lookHead
            tmpOutfit.lookBody = outfit.lookBody
            tmpOutfit.lookLegs = outfit.lookLegs
            tmpOutfit.lookFeet = outfit.lookFeet
            tmpOutfit.lookLegs = outfit.lookLegs


doCreatureChangeOutfit(members, tmpOutfit)
doSendMagicEffect(getCreaturePosition(members), 66)
setPlayerStorageValue(cid, 77889, os.time()+cdtime)
end
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This command can use only leader of a party!")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must be in a party!")
end
return true
end
learned that today
 
Back
Top