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

Wysłany: 2017-06-05, 16:01


Janusz_GRA

NO NAME






Wiek: 26
Na forum: 3716 dni
Posty: 223
Nick w MP: michalMonster

Piwa: 175

Respekt: 85,8

Witam, mam problem z skryptem na duty administracji. Po wpisaniu komendy /admins kt?ra ma pokazywa? dost?pn? administracje w DB3 wyskakuje B??d: ERROR:[skrypty]\admins\base.lua:521:attempt to concatenate a boolean value
Linijka 521
nick "#ff0000#FFFFFF "..getPlayerName ).."("..getElementData(v,"id")..")"

Kto? wie jak to naprawi??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-05, 16:07


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
Najwidoczniej element "v" nie posiada takiej elementdaty, jak: "id"

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 13:02


Janusz_GRA

NO NAME






Wiek: 26
Na forum: 3716 dni
Posty: 223
Nick w MP: michalMonster

Piwa: 175

Respekt: 85,8

eject, A gdzie mog? znale?? elementdate do elementu "v"?

Podpis
Jeśli nie możesz czegoś zrobić dobrze, przynajmniej spraw, żeby wyglądało dobrze.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 13:16


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

Janusz_GRA, mo?e podaj kod?

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 13:28


Janusz_GRA

NO NAME






Wiek: 26
Na forum: 3716 dni
Posty: 223
Nick w MP: michalMonster

Piwa: 175

Respekt: 85,8

BarteQ03,
function sprawdzRoota(login)
    plik xmlLoadFile("@config/rooty.xml")
    if plik then
        local nodetable xmlNodeGetChildren(plik)
        for i,nodexml in ipairs(nodetable) do
            if tostring(xmlNodeGetAttribute(nodexml"login")) == login then
                 return true
            end
        end
        xmlUnloadFile(plik)
        return false    
    end
end

function sprawdzAdmina(login)
    plik xmlLoadFile("@config/admini.xml")
    if plik then
        local nodetable xmlNodeGetChildren(plik)
        for i,nodexml in ipairs(nodetable) do
            if tostring(xmlNodeGetAttribute(nodexml"login")) == login then
                return true
            end
        end
        xmlUnloadFile(plik)
        return false
    end
end

function sprawdzModeratora(login)
    plik xmlLoadFile("@config/moderatorzy.xml")
    if plik then
        local nodetable xmlNodeGetChildren(plik)
        for i,nodexml in ipairs(nodetable) do
            if tostring(xmlNodeGetAttribute(nodexml"login")) == login then
                 return true
            end
        end
        xmlUnloadFile(plik)
        return false        
    end
end

function sprawdzPojazd(value)
    plik xmlLoadFile(":go-vehicles/config/pojazdy.xml")
    if plik then
        local nodetable xmlNodeGetChildren(plik)
        for i,nodexml in ipairs(nodetable) do
            if tostring(xmlNodeGetAttribute(nodexml"id")) == login then
                return xmlNodeGetAttribute(nodexml"id")
            end
        end
        xmlUnloadFile(plik)
    end
end

-- KOMENDY DLA ROOTA
addCommandHandler("r", function(plrcmd, ...)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(loginthen
        local text table.concat(arg" ")
        outputChatBox(">> "..textgetRootElement(), 25500)
    end
end)

addCommandHandler("przeladuj", function(plrcmdvalue)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(loginthen
        if not value then
            outputChatBox("U?yj: /przeladuj <nazwa zasobu>")
            return
        end
        restartResource(value)
    end
end)

addCommandHandler("frakcja", function(plrcmdtargetvalue)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(loginthen
        if (not target or not valuethen
            outputChatBox("U?yj: /frakcja <id/nick> <id>"plr)
            return
        end
        
        local target findPlayer(plrtarget)
        
        if (not targetthen
            outputChatBox("Nie znaleziono gracza o nicku " .. targetplr)
            return
        end
        
        setElementData(target"gracz_frakcja"value)
        outputChatBox("* Doda?e? gracza do frakcji o id: ".. valueplr)
        outputChatBox("* Dodano ci? do frakcji o id: ".. valuetarget)
    end
end)

-- KOMENDY DLA ADMINA
addCommandHandler("a", function(plrcmd, ...)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzAdmina(loginthen
        local text table.concat(arg" ")
        outputChatBox(">> "..textgetRootElement(), 0255255)
    end
end)

-- KOMENDY DLA MODERATORA
addCommandHandler("m", function(plrcmd, ...)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzModeratora(loginthen
        local text table.concat(arg" ")
        outputChatBox(">> "..textgetRootElement(), 02550)
    end
end)

-- KOMENDY DLA WSZYSTKICH
addCommandHandler("daj.kase", function(plrcmdtargetvalue)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(loginthen
        if (not target or not valuethen
            outputChatBox("U?yj: /daj.kase <id/nick> <ilosc>"plr)
            return
        end
        
        local target findPlayer(plrtarget)
        
        if (not targetthen
            outputChatBox("Nie znaleziono gracza o nicku ".. targetplr)
            return
        end
        
        givePlayerMoney(targetvalue)
    end
end)

addCommandHandler("wyrzuc", function(plrcmdtargetpowod)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(loginthen
        if (not target or not powodthen
            outputChatBox("U?yj: /wyrzuc <id/nick> <powod>"plr)
            return
        end
        
        local target findPlayer(plrtarget)
        
        if (not targetthen
            outputChatBox("Nie znaleziono gracza o nicku " .. targetplr)
            return
        end
    
        kickPlayer(targetplrpowod)
        outputChatBox("".. getPlayerName(target) .." zosta? wyrzucony przez: ".. getPlayerName(plr) ..", Pow?d: ".. powod ..""source25500)
    end
end)

addCommandHandler("zbanuj", function(plrcmdtargetpowod)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (not target or not powodthen
            outputChatBox("U?yj: /zbanuj <id/nick> <powod>"plr)
            return
        end
            
        local target findPlayer(plrtarget)
            
        if (not targetthen
            outputChatBox("Nie znaleziono gracza o nicku " .. targetplr)
            return
        end
            
        banPlayer(targetplrpowodczas)
        outputChatBox("".. getPlayerName(target) .." zosta? zbanowany przez: ".. getPlayerName(plr) ..", Pow?d: ".. powod ..""source25500)
    end
end)

addCommandHandler("zabierz.prawko", function(plrcmdcel, ...)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        local target findPlayer(plrcel)
        
        if (not targetthen
            outputChatBox("Nie znaleziono gracza " .. cel,plr )
            return
        end
        
        local tresc table.concat(arg" ")
        local pojazd getPedOccupiedVehicle(target)
        
        if (string.len(tresc)<=1then
            outputChatBox("Wpisz tresc zabrania prawa jazdy!"plr)
            return
        end
        
        if (getPedOccupiedVehicle(target)) then
            removePedFromVehicle(target)
        end

        setElementData(target"prawojazdy"0)
        outputChatBox("Otrzyma?e? zakaz prowadzenia pojazd?w od: ".. getPlayerName(plr) .."!"target25500)
        outputChatBox(getPlayerName(target) .. " otrzyma?/a zakaz prowadzenia pojazd?w kat. A/B/C od: " .. getPlayerName(plr) .. ": " .. trescgetRootElement(), 25500)
    end
end)

addCommandHandler("p", function(plrcmdmodel)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (not modelthen
            outputChatBox("U?yj: /p <model>"plr)
            return
        end
        
        local dim getElementDimension(plr)
        local x,y,getElementPosition(plr)
        local r1,r2,r3 getElementRotation(plr)
        local model getVehicleModelFromName(model)
        
        if getPedOccupiedVehicle(plrthen
            setElementModel(getPedOccupiedVehicle(plr), model)
        else
            local pojazd createVehicle(modelxyzr1r2r3)
            warpPedIntoVehicle(plrpojazd)
            setElementDimension(pojazddim)
        end
        
    end
end)

addCommandHandler("dim", function(plrcmdvalue)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (not valuethen
            outputChatBox("U?yj: /dim <numer>"plr)
            return
        end
        
        setElementDimension(plrvalue)
    end
end)

--[[addCommandHandler("ac", function(plrcmd, ...)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        local text table.concat(arg" ")
        for i,v in ipairs(getElementsByType("player")) do
            outputChatBox("#000000AC> #FFFFFF"..getPlayerName(plr).. "(".. getElementData(plr"id") .."): " .. textv255255255true)
            playSoundFrontEnd(plr12)
        end
    end
    end)--]]

addCommandHandler("jp", function(plrcmd)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (isPedInVehicle(plr)) then
            removePedFromVehicle(plr)
        end
        if (doesPedHaveJetPack(plr)) then
            removePedJetPack(plr)
        else
            givePedJetPack(plr)
        end
    end
end)

addCommandHandler("up", function(plrcmdvalue)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (tonumber(value)==nilthen
            outputChatBox("U?yj: /up <ile>"plr)
            return
        end
    
        local e plr
    
        if (isPedInVehicle(plr)) then
            e getPedOccupiedVehicle(plr)
        end
    
        local x,y,getElementPosition(e)
        setElementPosition(exyz+tonumber(value))
    end
end)

addCommandHandler("thru", function(plrcmdvalue)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (tonumber(value)==nilthen
            outputChatBox("U?yj: /thru <ile>"plr)
            return
        end
    
        local e plr
    
        if getCameraTarget(plr) ~= plr then
            e getCameraTarget(plr)
        end
    
        if (isPedInVehicle(plr)) then
            e getPedOccupiedVehicle(e)
        end
    
        local x,y,getElementPosition(e)
        local _,_,rz getElementRotation(e)
    
        local rrz math.rad(rz)
        local x + (value math.sin(-rrz))
        local y + (value math.cos(-rrz))
    
        setElementPosition(exyz)
    end
end)

addCommandHandler("fix", function(plr)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(loginthen
        local pojazd getPedOccupiedVehicle(plr)
        if not pojazd then
            outputChatBox("Musisz by? w poje?dzie!"plr)
            return
        end
        setElementHealth(pojazd1000)
        fixVehicle(pojazd)
    end
end)

addCommandHandler("tt", function(plrcmdtarget)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (not targetthen
            outputChatBox("U?yj: /tt <id/nick"plr)
            return
        end
        
        local target findPlayer(plrtarget)
        
        if (not targetthen
            outputChatBox("Nie znaleziono gracza o nicku " .. targetplr)
            return
        end
        local x,y,getElementPosition(target)
        if (isPedInVehicle(plr)) then
            removePedFromVehicle(plr)
        end
        setPedAnimation(plr)
        setElementAlpha(plr0)
        setElementDimension(plrgetElementDimension(target))
        setElementInterior(plrgetElementInterior(target))
        setElementPosition(plrx+math.random(-3,3), y+math.random(-3,3), z+math.random(0,3))
    end
end)

addCommandHandler("th", function(plrcmdtarget)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (not targetthen
            outputChatBox("U?yj: /th <id/nick>"plr)
            return
        end
        
        local target findPlayer(plrtarget)
        
        if (not targetthen
            outputChatBox("Nie znaleziono gracza o nicku " .. targetplr)
            return
        end
        local x,y,getElementPosition(plr)
        if (isPedInVehicle(target)) then
            removePedFromVehicle(target)
        end
        
        fadeCamera(targettrue)
        setElementDimension(targetgetElementDimension(plr))
        setElementInterior(targetgetElementInterior(plr))
        setElementPosition(targetx+(math.random(-1,1)/5), y+(math.random(-1,1)/5), z+(math.random(0,10)/10))
    end
end)

addCommandHandler("heal", function(plrcmdcel)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (not celthen
            outputChatBox("U?yj: /heal <id/nick"plr)
            return
        end
        
        local target findPlayer(plrcel)
        
        if (not targetthen
            outputChatBox("Nie znaleziono gracza o podanym ID/nicku!"plr)
            return
        end
        
        setElementHealth(target100)
        outputChatBox("* Uleczono gracza ".. getPlayerName(target), plr)
        outputChatBox("(( Zosta?e? uleczony/a. ))"target)
    end
end)

addCommandHandler("spec", function(plrcmdcel)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (not celthen
            outputChatBox("U?yj: /spec <id/nick"plr)
            return
        end
        
        local target findPlayer(plrcel)
    
        if (not targetthen
            outputChatBox("Nie znaleziono gracza o podanym ID/nicku!"plr)
            return
        end
    
        removePedFromVehicle(plr)
        setElementInterior(plrgetElementInterior(target))
        setElementDimension(plrgetElementDimension(target))
        setElementPosition(plr, -244.212602.0462.70)
        setCameraTarget(plrtarget)
    end
end)
    
addCommandHandler("specoff", function(plrcmd)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        setElementPosition(plr, -244.212602.0462.70)
        setCameraTarget(plrplr)
    end
end)

addCommandHandler("inv", function(plr)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        if (getElementAlpha(plr)>0then
            setElementAlpha(plr0)
        else
            setElementAlpha(plr255)
        end
    end
end)

addCommandHandler("invveh", function(plr)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        local plr getPedOccupiedVehicle(plr)
        if not plr then return end
        if (getElementAlpha(plr)>0then
            setElementAlpha(plr,0)
        else
            setElementAlpha(plr,255)
        end
    end
end)

addCommandHandler("warn", function(plr,cmd,cel, ...)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        local target findPlayer(plrcel)
        if (not targetthen
            outputChatBox("Nie znaleziono gracza " .. cel,plr )
            return
        end
        local tresc table.concat(arg" ")
        if (string.len(tresc)<=1then
            outputChatBox("Wpisz tresc ostrzezenia!"plr)
            return
        end
        triggerClientEvent("onPlayerWarningReceived"targettresc)
        outputChatBox(getPlayerName(target) .. " otrzymal ostrzezenie od " .. getPlayerName(plr) .. ", pow?d: " .. trescgetRootElement(), 25500)
    end
end)

addCommandHandler("vopis", function(plrcmd, ...)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
        local opis table.concat(arg" ")
        if (string.len(opis)<3then
            outputChatBox("U?yj: /vopis <opis>, lub /vopis usun"plr)
            return
        end
    
        local pojazd getPedOccupiedVehicle(plr)
    
        if (not pojazdthen
            outputChatBox("Musisz by? w poje?dzie w kt?rym chcesz zmieni? opis."plr25500)
            return
        end
    
        if (opis=="usun" or opis=="USUN"then
            removeElementData(pojazd"pojazd_opis")
        else
            setElementData(pojazd"pojazd_opis"opis)
        end
    end
end)

addCommandHandler("thv", function(plrcmdvid)
    local login getAccountName getPlayerAccount plr ) )
    if sprawdzRoota(loginthen
    if not tonumber(vidthen return end
    for i,v in ipairs(getElementsByType("vehicle")) do
    if getElementData(v"car_id") == tonumber(vidthen
                local x,y,getElementPosition(plr)
                setElementFrozen(vfalse)
                warpPedIntoVehicle(plrv)
                setElementPosition(vx,y,z)
                setElementInterior(vgetElementInterior(plr))
                setElementDimension(vgetElementDimension(plr))
                return
            end
          end
         end
         outputChatBox("* Nie masz praw do ten kom?dy lub nie znaleziono auta o takim ID!"plr25500)
    end)
    
    
    addCommandHandler "admins", function ( plrcmd )
    admini = {}
    support = {}
    super = {}
    for _,v in ipairs getElementsByType "player" ) ) do
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(v)), aclGetGroup "RCON" ) ) then
        nick "#ff0000#FFFFFF "..getPlayerName ).."("..getElementData(v,"id")..")"
            table.insert admininick )
        end
    end
    outputChatBox "RCONi: "plr128,0,)
    --outputChatBox " "plr255255)
    if #admini > 0 then
        table.concat admini", " )
        outputChatBox cplr255255255true )
    else
        outputChatBox "Brak"plr )
    end
    -------------RCON
        for _,v in ipairs getElementsByType "player" ) ) do
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(v)), aclGetGroup "Admin2" ) ) then
        nick "#ff0000#FFFFFF "..getPlayerName ).."("..getElementData(v,"id")..")"
            table.insert supportnick )
        end
    end
    outputChatBox " "plr255255)
    outputChatBox "#ff9900Administratorzy:"plr255,0,0true )
    --outputChatBox " "plr0255255true )
    if #support > 0 then
        table.concat support", " )
        outputChatBox cplr255255255true )
    else
        outputChatBox "Brak"plr )
    end
    -------------Admin
            for _,v in ipairs getElementsByType "player" ) ) do
            if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(v)), aclGetGroup "Moderator" ) ) then
            nick "#ff0000#FFFFFF "..getPlayerName ).."("..getElementData(v,"id")..")"
            table.insert supernick )
        end
    end
    outputChatBox " "plr255255)
    outputChatBox "#0EC711Moderatorzy:"plr0255255true )
    --outputChatBox " "plr0255255true )
    if #super > 0 then
        table.concat super", " )
        outputChatBox cplr255255255true )
    else
        outputChatBox "Brak"plr )
    end
    -------------Mods
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 13:58


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

 addCommandHandler "admins", function ( plrcmd )
    admini = {}
    support = {}
    super = {}
    for k,v in ipairs getElementsByType "player" ) ) do
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(v)), aclGetGroup "RCON" ) ) then
        nick "#ff0000#FFFFFF "..getPlayerName ).."("..getElementData(v,"id")..")"
            table.insert admininick )
        end
    end

spr?buj tak lecz nie jestem pewien :/

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 16:14


Janusz_GRA

NO NAME






Wiek: 26
Na forum: 3716 dni
Posty: 223
Nick w MP: michalMonster

Piwa: 175

Respekt: 85,8

BarteQ03, Niestety ale nadal nie dzia?a

Podpis
Jeśli nie możesz czegoś zrobić dobrze, przynajmniej spraw, żeby wyglądało dobrze.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 18:05


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
Czlowieku, tlumacze ci ze twoj system ID nie dziala, zastosuj ten z xyzzyrp

[ Dodano: 2017-06-06, 18:05 ]
"BarteQ03" napisał/a:

 addCommandHandler "admins", function ( plrcmd )
    admini = {}
    support = {}
    super = {}
    for k,v in ipairs getElementsByType "player" ) ) do
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(v)), aclGetGroup "RCON" ) ) then
        nick "#ff0000#FFFFFF "..getPlayerName ).."("..getElementData(v,"id")..")"
            table.insert admininick )
        end
    end

spr?buj tak lecz nie jestem pewien :/


Nie udzielaj sie jesli nie wiesz

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 18:32


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

O jezu nikt nie potrafi wpa?? na pomys? jak sprawdzi? id?...

function SprawdzID(plr,cmd)
local id getElementData(plr,"id")
if id then 
outputChatBox("Masz id o numerze: "..id,plr)
else
outputChatBox("Nie posiadasz elementDaty id",plr)
end
end
addCommandHandler("sID",SprawdzID)

I wszystko si? wyja?ni.

Ostatnio zmieniony przez amited 2017-06-06, 20:02, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 19:49


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

amited, nom nie bardzo, bardziej co? takiego :


function SprawdzID(plr,cmd)
    local id getElementData(plr,"id")
    if id then 
        outputChatBox("Masz id o numerze: "..id,plr)
    else
        outputChatBox("Nie posiadasz takiej element daty.",plr)
    end
end
addCommandHandler("sID",SprawdzID)


jak ju? co? :)

(skoro niema element daty, to co ma ci wy?wietli? ? )

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 20:01


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

BlackGamePL, a nie dobra nie zadzia?a bo da?em cudzys??w a nie apostrof xd G?upi szift. Jednak?e zapewnie ci chodzi?o ?e mia?o tam wypisa? t? element dat? pod kt?r? jest podpisana zmienna 'id' jednak tam nie ma nigdzie znak?w ??cz?cych czyli '..' o tym zapomnia?e? :)

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 20:08


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

amited, Chodzi?o mi o 6 linijk?, kt?ra wygl?da?a tak :


outputChatBox("Nie posiadasz element daty "id" ",plr)


b??d jest taki, ?e brakowa?o '..' , natomiast je?eli niema takie element daty, to co ma wy?wietli?, reasumuj?c by?y 2 b??dy. Ale luzik bez spin :P

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-06, 20:13


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

BlackGamePL, W?a?nie nie chcia?em jej wy?wietla? tylko napisa? ?e takiej daty nie ma xd

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Tagi: administracja
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