English Reset Scores for Hc.

2 replies
Goto Page
To the start Previous 1 Next To the start
10.07.18 10:16:32 am
Up
ImQuiet
User
Offline Off
Hi folks,
i came here for ask some help and fix my lua code for Hc Admin script.

i want to replace Reset Stats option to Reset scores respectively.

Code sys > lua > hc > modules > playerstats in Line 234 code of Reset Stats.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function hc.playerstats.reset_command(p)
    local entries = {
        { title = "Yes: Reset my stats!", value = true, id = p },
        { title = "No!", value = false, id = p }
    }
    hc.show_menu(p, "Reset Stats?", entries, hc.playerstats.reset_cb)
end

function hc.playerstats.reset_cb(p, _, item)
    if item.value then
        hc.players[p].playerstats = hc.playerstats.get_empty_stats();
        hc.players[p].playerstats.next_lvl = 1
        hc.players[p].playerstats.saved = hc.playerstats.get_empty_stats();

        local usgn = hc.get_usgn(p)

        if hc.playerstats.usgn[usgn] ~= nil then
        -- Move players up on the top list
            for pos=hc.playerstats.usgn[usgn].position,#hc.playerstats.top - 1 do
                hc.playerstats.top[pos] = hc.playerstats.top[pos + 1]
                hc.playerstats.top[pos].position = pos
            end
            hc.playerstats.usgn[usgn] = nil
            hc.playerstats.top[#hc.playerstats.top] = nil
        end
        hc.event(p, "\169255255000[SERVER]\169255255255: Your statistics have been reset.")
    else
        hc.event(p, "\169255255000[SERVER]\169255255255: Your statistics were not reset.")
    end
end


i want remove reset stats system and add reset scores.
Replace " Yes Reset my stats" to "Yes" And "No!" to 'No"
If click on "Yes" so our scores reset and msg appear "Scores reset" or if click on "No" so nothing happen

i really hard to did it myself but i got errors and was some confutions in parse fuction

Please help me.
edited 1×, last 11.07.18 05:57:45 am
FRiendly boYy.
10.07.18 10:23:47 am
Up
script favor
User
Offline Off
omg , just unload them in hc.conf
Visit my website : https://bounty-mafia.tk , Discord : https://discord.gg/ntNd6TX, IMG:http://i60.tinypic.com/5kixc8.gif
10.07.18 05:38:13 pm
Up
ImQuiet
User
Offline Off
What do you mean? @user script favor:
FRiendly boYy.
To the start Previous 1 Next To the start