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

Mod mylitari rank

lopez65

Member
Joined
May 10, 2012
Messages
289
Solutions
1
Reaction score
14
Location
Barcelona
hello friends would be possible this mod that asks for storage rank and if it is possible that the same ip does not count the frag

Scrip:

Code:
<?xml version = "1.0" encoding = "UTF-8"?>
    <mod name = "Military Ranks" version = "1.0" author = "Teckman" enabled = "yes">
        <config name = "ranks"><![CDATA[
            titles = {
                [1] = "Private First Class",
                [3] = "Specialist",
                [5] = "Corporal",
                [10] = "Sargento",
                [12] = "Staff Sargento",
                [15] = "Sargento de Primera",
                [20] = "Master Sargento",
                [22] = "Primer Sargento",
                [25] = "Sargent Mayor",
                [30] = "Sargento Mayor Comando",
                [35] = "Sargento Mayor Ejercito",
                [38] = "Segundo Tenientet",
                [40] = "Primer Teniente",
                [45] = "Capitan",
                [48] = "Mayor",
                [50] = "El teniente coronel",
                [55] = "Coronel",
                [100] = "General de brigada",
                [110] = "El General de division",
                [120] = "Lieutenant General",
                [140] = "General",
                [170] = "General del Ejercito"
            }
            fragsStorage = 600
        ]]></config>
        <event type = "look" name = "ranksLook" event = "script"><![CDATA[
            domodlib("ranks")
            function onLook(cid, thing, position, lookDistance)
                if(isPlayer(thing.uid)) then
                    local rank = {rank = "Private", frags = 0}
                    for k, v in pairs(titles) do
                        if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then
                            if(k - 1 > rank.frags) then
                                rank.rank, rank.frags = v, k - 1
                            end
                        end
                    end
                    doPlayerSetSpecialDescription(thing.uid, "\n Military rank: " .. rank.rank)
                end
                return true
            end
        ]]></event>
        <event type = "kill" name = "ranksKill" event = "script"><![CDATA[
            domodlib("ranks")
            function onKill(cid, target)
                if(isPlayer(target)) then
                    setPlayerStorageValue(cid, fragsStorage, math.max(0, getPlayerStorageValue(cid, fragsStorage) + 1))
                    if(titles[getPlayerStorageValue(cid, fragsStorage)]) then
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced to military rank: " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. ". Congratulations " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. "!")
                    end
                end
                return true
            end
        ]]></event>
        <event type = "login" name = "ranksLogin" event = "script"><![CDATA[
            function onLogin(cid)
                registerCreatureEvent(cid, "ranksKill")
                registerCreatureEvent(cid, "ranksLook")
                return true
            end
        ]]></event>
    </mod>
 
Back
Top