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

Wysłany: 2017-11-21, 21:29


NorbiNorbi







Wiek: 29
Na forum: 3204 dni
Posty: 3
Nick w MP: NorbiTTT



Respekt: 50

Cze??, mam problem z pewn? komend?.. ./zpA/zpB i /zbC prosz? pom??cie, gdy wpisze komendy zeby zabrac prawo jazdy jakiejs kategori to nawet po zabraniu nadal mozna wsiadac i jezdzic

addCommandHandler("zpA", function(plr,cmd,cel,time,rodzaj,...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        local reason=table.concat({...}, " ")
        if not cel or not tonumber(time) or not rodzaj or not reason then
            outputChatBox("U?ycie: /zpA <nick/ID> <czas> <jednostka: m/h/d/w> <pow?d>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("Nie znaleziono podanego gracza."plr25500)
            return
        end
        local query=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","A"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            return exports["1"]:outputNotificationBox (plr"#cc0000Gracz Posiada zawieszone prawo jazdy do #00cccc"..result["time"]..", #cc0000za: #00cccc"..result["reason"])
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""A"getPlayerSerial(plr))
        end
        if isPedInVehicle(targetthen
            removePedFromVehicle(target)
        end
        if tonumber(time) <= 0 then return end
        local result "DATE()"
        if rodzaj == "m" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d MINUTE)',time)
        elseif rodzaj == "h" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d HOUR)',time)
        elseif rodzaj == "d" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d DAY)',time)
        elseif rodzaj == "w" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d WEEK)',time)
        end
        reason reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") otrzyma?(a) zakaz prowadzenia pojazd?w (kat. A) "..reason.."("..time .. rodzaj ..")")
        local query string.format("INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES ('%s','%s',%s,'%s')"getPlayerSerial(target), reasonresult"A")
        exports["ogrpg-db"]:dbSet(query)
        triggerEvent("save:player",root,target)
    end
end)

addCommandHandler("zpB", function(plr,cmd,cel,time,rodzaj,...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        local reason=table.concat({...}, " ")
        if not cel or not tonumber(time) or not rodzaj or not reason then
            outputChatBox("U?ycie: /zpB <nick/ID> <czas> <jednostka: m/h/d/w> <pow?d>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("Nie znaleziono podanego gracza."plr25500)
            return
        end
        local query=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","B"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            return exports["1"]:outputNotificationBox (plr"#cc0000Gracz Posiada zawieszone prawo jazdy do #00cccc"..result["time"]..", #cc0000za: #00cccc"..result["reason"])
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""B"getPlayerSerial(plr))
        end
        if isPedInVehicle(targetthen
            removePedFromVehicle(target)
        end
        if tonumber(time) <= 0 then return end
        local result "DATE()"
        if rodzaj == "m" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d MINUTE)',time)
        elseif rodzaj == "h" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d HOUR)',time)
        elseif rodzaj == "d" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d DAY)',time)
        elseif rodzaj == "w" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d WEEK)',time)
        end
        reason reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") otrzyma?(a) zakaz prowadzenia pojazd?w (kat. B) "..reason.."("..time .. rodzaj ..")")
        local query string.format("INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES ('%s','%s',%s,'%s')"getPlayerSerial(target), reasonresult"B")
        exports["ogrpg-db"]:dbSet(query)
        triggerEvent("save:player",root,target)
    end
end)

addCommandHandler("zpC", function(plr,cmd,cel,time,rodzaj,...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        local reason=table.concat({...}, " ")
        if not cel or not tonumber(time) or not rodzaj or not reason then
            outputChatBox("U?ycie: /zpC <nick/ID> <czas> <jednostka: m/h/d/w> <pow?d>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("Nie znaleziono podanego gracza."plr25500)
            return
        end
        local query=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","C"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            return exports["1"]:outputNotificationBox (plr"#cc0000Gracz Posiada zawieszone prawo jazdy do #00cccc"..result["time"]..", #cc0000za: #00cccc"..result["reason"])
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""C"getPlayerSerial(plr))
        end
        if isPedInVehicle(targetthen
            removePedFromVehicle(target)
        end
        if tonumber(time) <= 0 then return end
        local result "DATE()"
        if rodzaj == "m" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d MINUTE)',time)
        elseif rodzaj == "h" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d HOUR)',time)
        elseif rodzaj == "d" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d DAY)',time)
        elseif rodzaj == "w" then
        result string.format('DATE_ADD(NOW(), INTERVAL %d WEEK)',time)
        end
        reason reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") otrzyma?(a) zakaz prowadzenia pojazd?w (kat. C) "..reason.."("..time .. rodzaj ..")")
        local query string.format("INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES ('%s','%s',%s,'%s')"getPlayerSerial(target), reasonresult"C")
        exports["ogrpg-db"]:dbSet(query)
        triggerEvent("save:player",root,target)
    end
end)


Ostatnio zmieniony przez _Haze 2017-11-25, 14:11, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-22, 08:10


wicher4900

Były Programista






Wiek: 25
Na forum: 3610 dni
Posty: 21
Nick w MP: Naveex

Piwa: 1732

Respekt: 50,5

1. Nie ten dzia?
2. Dodaj do ACL jako admin resource.*
Ewentualnie resource.NazwaSkryptu

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-24, 17:37


kamilryb1

LUA






Wiek: 21
Na forum: 4266 dni
Posty: 146

Piwa: 319

Respekt: 7,3

Ostrzeżeń: 40%
./debugscript 3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-25, 15:03


Kalizman







Wiek: 23
Na forum: 3652 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: działa :: komenda :: ./zpj :: //zpa
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Nie działa komenda ./zpj //zpA 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