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

Wysłany: 2020-06-20, 16:55


Matikmontana

Modern Stories






Wiek: 22
Na forum: 2473 dni
Posty: 423
Nick w MP: Mazeusz*

Piwa: 1015

Respekt: 130
Respekt: 130

Ostrzeżeń: 60%
Dobry, pr?buje zrobi? aby administrator m?g? dawa? prawko na komend? tylko ?e po wpisaniu cmd prawko nie zapisuje si? w bazie. Brak b??d?w w db3

addCommandHandler("dajprawko", function(plr,cmd,cel,pjB)
    if getAdmin(plr,5) or getAdmin(plr,4) or getAdmin(plr,3then
        --local reason=table.concat({...}, " ")
        if not cel then
            outputChatBox("* U?ycie: /dajprawko <nick/ID>"plr)
            return
        end
        local target=exports["pystories-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("MS&#9819; &#8226; Nie znaleziono podanego gracza."plr51,102,255)
            return
        end
        exports["pystories-db"]:dbSet("UPDATE pystories_users SET pjB=1 WHERE id=?"getElementData(target"player:sid"))
        triggerEvent("save:player",plr,target)
        triggerEvent("load:player",plr,target)    
        setElementData(target,"player:license:pjB",pjB)
        ---setElementData(target,"player:license:pjB",pjB)
        outputChatBox("MS&#9819; &#8226; Otrzyma?e?(a?) prawo jazdy kat.B, zr?b /reconnect"target)
        outputChatBox ("MS&#9819; &#8226; Nada?e?(a?) Prawko B " ..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
        exports["pystories-db"]:dbSet("INSERT INTO qg_logi_cmd_adm (uid,moderator,cmd) VALUES (?,?,?)"getElementData(plr,"player:sid"), getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), "dajprawkoB " ..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."")
    end
end)


[ Dodano: 2020-06-20, 16:57 ]
Dobra zrobi?em XD

W tej linijce zamiast "pjB" trzeba da? "1"
        setElementData(target,"player:license:pjB",1


Podpis


Modern Stories
Discord
https://discord.gg/MRJSYq8
Forum
https://msmta.pl
Panel Gracza
https://panel.msmta.pl
Postaw piwo autorowi tego posta
 

 
Tagi: prawo :: jazdy :: komende
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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