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

Wysłany: 2014-12-22, 23:45


iWanted







Wiek: 31
Na forum: 4409 dni
Posty: 26
Nick w MP: .QUENNY

Piwa: 366

Respekt: 76,8

Ostrzeżeń: 100%
Pomoze mi ktos z kodem?
wyskakuje blad ; unexpected symbol near 'elseif' 101 linijka
function isRCON ( plr ) 

local accName = getAccountName ( getPlayerAccount ( plr ) ) 

if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 

return true 

end 

end 




function isAdmin ( plr ) 

local accName = getAccountName ( getPlayerAccount ( plr ) ) 

if isObjectInACLGroup ("user."..accName, aclGetGroup ( "SuperModerator" ) ) then 

return true 

end 

end 







function isModerator ( plr ) 

local accName = getAccountName ( getPlayerAccount ( plr ) ) 

if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then 

return true 

end 

end 










function cmd_admins(plr) 

local moderatorzy={} 

local admini={} 

local rconi={} 

for i,v in ipairs(getElementsByType("player")) do 

if (isRCON(v)) then 





table.insert(rconi,t) 
local t = getPlayerName(v).."," 





elseif (isAdmin(v)) then 






table.insert(admini,t) 
local t = getPlayerName(v).."," 







elseif (isModerator(v)) then 





table.insert(moderatorzy,t) 
local t = getPlayerName(v).."," 



end 

end 

outputChatBox("RCONi:", plr, 128,0,0) 

if (#rconi>0) then 

outputChatBox(" " .. table.concat(RCONi,", "), plr) 

else 

outputChatBox(" brak", plr) 

end 

outputChatBox("Admini:", plr, 255,0,0) 

if (#admini>0) then 

outputChatBox(" " .. table.concat(admini,", "), plr) 

else 

outputChatBox(" brak", plr) 

end 




outputChatBox("Moderatorzy:", plr, 100,100,255) 

if (#moderatorzy>0) then 

outputChatBox(" " .. table.concat(moderatorzy,", "), plr) 

else 

outputChatBox(" brak", plr) 

end 

end 

addCommandHandler("admins", cmd_admins, false, false)


[ Dodano: 2014-12-23, 18:56 ]
Pomoze ktos ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-23, 21:23


Vike4562

LUA <3






Wiek: 28
Na forum: 5078 dni
Posty: 144
Nick w MP: Vike4562

Piwa: 32

Respekt: 61

A czemu nie zrobisz if end if end? Bo ja og?lnie nie widz? b??du :/

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: lista :: adminow
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