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

Wysłany: 2016-04-03, 18:49


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

   
    addCommandHandler "admins", function ( plrcmd )
    admini = {}
    support = {}
    super = {}
    for _,v in ipairs getElementsByType "player" ) ) do
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(v)), aclGetGroup "RCON" ) ) then
        nick "#FFFFFF"..getPlayerName "#0066cc["..getElementData(v,"id").."]" (v)
            table.insert admininick )
        end
    end
    outputChatBox "* ROOTy online:"plr255,0,)
    --outputChatBox " "plr255255)
    if #admini > 0 then
        table.concat admini", " )
        outputChatBox cplr255255255true )
    else
        outputChatBox "--"plr,255,255,255,true )
    end
    -------------RCON
        for _,v in ipairs getElementsByType "player" ) ) do
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(v)), aclGetGroup "Administrator" ) ) then
        nick "#FFFFFF"..getPlayerName "#0066cc["..getElementData(v,"id").."]" (v)
            table.insert supportnick )
        end
    end
    outputChatBox "#ff9900* Administratorzy online:"plr255,0,0true )
    --outputChatBox " "plr0255255true )
    if #support > 0 then
        table.concat support", " )
        outputChatBox cplr255255255true )
    else
        outputChatBox "--"plr,255,255,255,true )
    end
    -------------Admin
            for _,v in ipairs getElementsByType "player" ) ) do
            if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(v)), aclGetGroup "Support" ) ) then
            nick "#FFFFFF"..getPlayerName "#0066cc["..getElementData(v,"id").."]" (v)
            table.insert supernick )
        end
    end
    outputChatBox "#0EC711* Pomocnicy online:"plr0255255true )
    --outputChatBox " "plr0255255true )
    if #super > 0 then
        table.concat super", " )
        outputChatBox cplr255255255true )
    else
        outputChatBox "--"plr,255,255,255,true )
    end
    -------------Mods
end)


Nie dzia?a komenda /admins , wcze?niej wszystko dzia?a?o.

DB3: syntax error near 'table'

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-03, 18:52


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

db3?

Podaj ca?y, nie wiadomo z tego kt?ra to linijka oraz co powoduje ten b??d.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Ostatnio zmieniony przez AteX 2016-04-03, 18:54, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-03, 18:54


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

DB3: syntax error near 'table'

w linijce 549 czyli :

table.insert admininick )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-03, 18:55


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

Tu jest b??d, co to jest to (v)?
nick "#FFFFFF"..getPlayerName "#0066cc["..getElementData(v,"id").."]" (v)


Chyba powinno by? tak.

nick "#FFFFFF"..getPlayerName(v).. "#0066cc["..getElementData(v,"id").."]"

Jest tak we wszystkich zmiennych nick.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-03, 18:58


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

v to p?tla chyba

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-03, 18:59


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

Nie v to gracz pobierany z tabeli wszystkich graczy.

Wy?ej da?em ju? poprawny kod.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-04-03, 18:59


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

dzia?a dzi?kuje leci piwko do zamkni?cia

Postaw piwo autorowi tego posta
 

 
Tagi: /admins
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » /admins 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