Englisch Hc ranks welcome Msg

8 Antworten
Gehe zu Seite
Zum Anfang Vorherige 1 Nächste Zum Anfang
10.06.18 12:41:42
Hoch
ImQuiet
User
Offline Off
Hi everyone, I came for need help about hc Admin script.
I added new ranks in hc admin script. script working perfect after add new ranks (No Error), now i want to add separate welcome messages each other rank, i tried hard to add it myself but always error show and i can't fix it.So i hope anybody will help me.i want welcome msg according to my levels

I added these ranks are given below.

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
31
32
33
34
35
36
37
38
39
40
hc.user.USER_LEVELS = {
    { title = "Guest", level = hc.USER },
    "",
    { title = "VIP", level = hc.VIP },    
    { title = "Super V.I.P", level = hc.VIP2 },
    "",
    { title = "Junior Moderator", level = hc.MODERATOR0 },
    { title = "Moderator", level = hc.MODERATOR1 },
    { title = "Senior Moderator", level = hc.MODERATOR2 },
    "",
    { title = "Administrator", level = hc.COADMINISTRATOR },
    { title = "Owner", level = hc.ADMINISTRATOR }
}

hc.user.COLOURS = {
    [hc.SPEC] = "",
    [hc.T] = hc.T_RED,
    [hc.CT] = hc.CT_BLUE
}

hc.user.SHORT_NAMES = {
    [hc.USER] = "User",
    [hc.VIP] = "VIP",
    [hc.VIP2] = "SVIP",
    [hc.MODERATOR0] = "Moderator1",
    [hc.MODERATOR1] = "Moderator2",
    [hc.MODERATOR2] = "Moderator3",
    [hc.COADMINISTRATOR] = "Adm",
    [hc.ADMINISTRATOR] = "Owner"
}

hc.user.NAME_TO_LEVEL = {
    VIP = hc.VIP,
    SVIP = hc.VIP2,
    Moderator1 = hc.MODERATOR0,
    Moderator2 = hc.MODERATOR1,
    Moderator3 = hc.MODERATOR2,
    Adm = hc.COADMINISTRATOR,
    Owner = hc.ADMINISTRATOR
}


Please help me for add welcome messages of each other level also hc.USER.

Thanks for attention
2× editiert, zuletzt 11.06.18 14:10:14
FRiendly boYy.
11.06.18 17:19:55
Hoch
Gaios
Security Supporter
Offline Off
rules §2.3 - Das Editieren von Beiträgen, damit diese als neu markiert werden (pushing), ist verboten

> Edit: sys/lua/hc/core/main.lua
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
function hc.main.pre_join_hook(p)
    local player_level = hc.get_level(p)

    hc.info(p, "Welcome, " .. player(p, "name") .. "!")
    hc.info(p, "Your rank is: " .. hc.get_level_short_name(player_level))

    -- you can also do such:
    if player_level == hc.VIP then
        -- code
    end

    hc.main.init_player(p, hc.PLAYER_JOIN)
end
IMG:https://i.imgur.com/itOslkM.gif
This community is a meme.
11.06.18 20:46:49
Hoch
ImQuiet
User
Offline Off
@user Gaios:
Thanks a lot but there is an Error even its working but i set my level Owner in data > Config > users like this
159747,Owner,Your Name
I'm always show in User level even i set Owner level.
Error is
LUA ERROR: sys/lua/hc/core/user.lua:91: table index is nil


And i really hope you'll help me again
FRiendly boYy.
11.06.18 22:06:03
Hoch
Gaios
Security Supporter
Offline Off
hc.OWNER
is not set, moron.
IMG:https://i.imgur.com/itOslkM.gif
This community is a meme.
12.06.18 07:01:01
Hoch
ImQuiet
User
Offline Off
Yes i know, hc.ADMINISTRATOR is set but why you saying that i didn't add hc.OWNER ?
FRiendly boYy.
12.06.18 08:03:10
Hoch
Gaios
Security Supporter
Offline Off
Show full code error and the following lines, idiot. How the fu*k can we debug your script with the error line only?!
IMG:https://i.imgur.com/itOslkM.gif
This community is a meme.
12.06.18 11:40:11
Hoch
Masea
Super User
Offline Off
@user Gaios: If you want to blame rather than help, how the fuck can he communicate with you?
Create and design your GUI easy and fast: file cs2d GUI Framework (12) | Go deep of the darkness and try your intrepidity: file cs2d Outlast 2 Modification (25)
12.06.18 11:53:57
Hoch
Yates
Reviewer
Offline Off
Please paste this file:
user.lua
either on site or at www.pastebin.com if it's too large.
13.06.18 10:03:18
Hoch
ImQuiet
User
Offline Off
Guys thanks a lot, Sorry that was my fault script @user Gaios: script Working Thanks.
1× editiert, zuletzt 13.06.18 10:26:40
FRiendly boYy.
Zum Anfang Vorherige 1 Nächste Zum Anfang