Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2020-10-27, 22:29


Patryk545







Wiek: 25
Na forum: 2225 dni
Posty: 36
Nick w MP: Patryk545

Piwa: 1

Respekt: 50

Mam taki problem, ?e po wpisaniu komendy /b i /k poka?e si? komunikat o tym, ?e kto? zosta? zbanowany lub wyrzucony ale nie wywala to ich lub nie banuje na serwerze czyli tak jakby te komendy nie dzia?a?y.



function cmd_pkick(plrcmdtarget, ...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6then
    if not target or not ... then
        outputChatBox("#007aff(ⓘ) #FFFFFFU?yj /k [ID/Nazwa gracza] [Pow?d]"plr255255255true)
        return
    end
    local player exports["pystories-core"]:findPlayer(plr,target)
    local text table.concat({...}, " ")
    if player then
        triggerClientEvent(getRootElement(), "notiBig"getRootElement(), "Gracz "..getPlayerName(player):gsub("#%x%x%x%x%x%x","").." zostaje wykopany/a przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").. " z powodu: "..texttext)
        outputConsole(" "player)
        outputConsole("Zosta?e? wykopany z serwera!"player)
        outputConsole("Osoba wyrzucaj?ca: "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), player)
        outputConsole("Pow?d: "..textplayer)
        outputConsole(" "player)
        kickPlayer(playergetPlayerName(plr), "Sprawd? swoj? konsol? (~)")
        end
    end
end
addCommandHandler("k"cmd_pkick)


addCommandHandler("b", function(plr,cmd,cel,x,bantype,...)
    if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,4then
        local reason=table.concat({...}, " ")
        if not cel or not tonumber(x) or not bantype or not reason then
            outputChatBox("#007aff(&#9432;) #FFFFFFU?ycie: /b <nick/ID> <ilo??> <m/h/d> <pow?d>"plr255,255,255true)
            outputChatBox("m - minuty/h - godziny/d - dni"plr)
            return
        end
        local target=exports["pystories-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("#bf0101(&#10006;) #FFFFFFNie znaleziono podanego gracza."plr255255255true)
            return
        end
        if (getAdmin(plr,4) == false) and getAdmin(target,4then return end
        reason reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
        if bantype=="m" or bantype=="h" or bantype=="d" then
        if bantype=="m" then
        exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)"getPlayerSerial(target),reasonx"ban")
        end
        if bantype=="h" then
        exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)"getPlayerSerial(target),reasonx"ban")
        end
        if bantype=="d" then
        exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)"getPlayerSerial(target),reasonx"ban")
        end
        end
        --triggerClientEvent(getRootElement(), "notiBig"getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." zosta?(a) zbanowany(a) za: "..reason..," na: " ..x..""", text)
        triggerClientEvent(getRootElement(), "notiBig", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." zostaje zbanowany/a przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").. " z powodu: "..reason.." na "..x.." "..bantype, text)
        kickPlayer(target,plr,"Zosta?e?(a?) zbanowany(a), po??cz si? ponownie.")
    end
end)


Ostatnio zmieniony przez PatryKK. 2020-10-27, 23:05, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-10-27, 22:38


evve







Wiek: 24
Na forum: 2696 dni
Posty: 15
Nick w MP: cruzeN

Piwa: 306

Respekt: 50

Ostrzeżeń: 60%
Dodaj do acl do rubryki Admin
<object name="resource.*"></object>
i powinno zadzia?a? ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-10-27, 22:50


Patryk545







Wiek: 25
Na forum: 2225 dni
Posty: 36
Nick w MP: Patryk545

Piwa: 1

Respekt: 50

Czyli mam napisa? zamiast tej gwiazdki to s_cmd.lua czy pystories-admins?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-10-27, 22:52


evve







Wiek: 24
Na forum: 2696 dni
Posty: 15
Nick w MP: cruzeN

Piwa: 306

Respekt: 50

Ostrzeżeń: 60%
masz t? gwiazdke da? i to powinno wystarczyc

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-10-27, 22:55


Patryk545







Wiek: 25
Na forum: 2225 dni
Posty: 36
Nick w MP: Patryk545

Piwa: 1

Respekt: 50

Ok dzi?ki

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-10-27, 22:58


RudyTMM
[Usunięty]









Musisz doda? do ACL resource.pystories-admin oraz pystories-core mi zawsze jak tak dawa?em dzia?a?o

 

 
Wysłany: 2020-10-27, 23:07


PatryKK.

Emeryt LUA






Wiek: 26
Na forum: 3061 dni
Posty: 1060
Nick w MP: PatryKK.

Piwa: 2322

Respekt: 331,5
Respekt: 331,5Respekt: 331,5Respekt: 331,5

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-10-29, 17:19


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

resource.pystories-admins
grupa admin

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: działają :: komendy :: /zpj :: /k.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku