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

Someone have this talkaction script --> !SAVE [Save own character]

ugurdrahs

New Member
Joined
May 6, 2010
Messages
555
Reaction score
2
Location
Netherland
Hi,

someone know the !save script,
all players can use it, and with this command his/her char will be saved.
So when theres crash he wont have any problems


repp+
 
Last edited:
This one is good?

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="command-save" version="1.0" author="slawkens" contact="[email protected]" enabled="yes">
        <config name="command-save-config"><![CDATA[
                exhaust = 3 -- in minutes
                storage = 3003 -- storage value used to save exhaustion
        ]]></config>

        <talkaction words="!save" event="script"><![CDATA[
                domodlib('command-save-config')

                local config = {
                        exhaustion = exhaust,
                        storage = storage
                }

                function onSay(cid, words, param, channel)
                        if(exhaustion.check(cid, config.storage)) then
                                doPlayerSendCancel(cid, "You can save yourself only once per " .. config.exhaustion .. " minutes.")
                                return true
                        end

                        if(doPlayerSave(cid)) then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your character has been succesfully saved.")
                                exhaustion.set(cid, config.storage, config.exhaustion * 60)
                        else
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error while saving your character. Please try again later.")
                        end

                        return true
                end
        ]]></talkaction>
</mod>

Also, this wont make the server laggy right? when people use it.
 
Back
Top