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

Wysłany: 2015-02-13, 15:13


pawel998







Wiek: 35
Na forum: 4261 dni
Posty: 29
Nick w MP: Piotrek101



Respekt: 40,5

Posiadam Kod Lua:
Kod:

addCommandHandler ( "Kr?tkofal?wka", function ( plr, cmd, ... )
if ... then
if getPlayerTeam ( plr ) then
if getTeamName ( getPlayerTeam ( plr ) ) ~= "Policja" or "Pogotowie" or "Panstwowa Straz Pozarna" then
return outputChatBox ( "Nie masz uprawnie?", plr ) end
team = getPlayerTeam ( plr )
for _,v in ipairs ( getPlayersInTeam ( team ) ) do
outputChatBox ( table.concat ( {...}, " " ), u )
end
end
end
end)

I nic nie dzia?a!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-02-13, 17:19


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Sprawd? i napisz :
function isPlayerInTeam(playerteam)
    assert(isElement(player) and getElementType(player) == "player""Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
    assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]")
    return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true)))
end

function Krotkofal?wkaplrcmd, ... )
    if ... then
        if isPlayerInTeam(plr"Policja" ) or isPlayerInTeam(plr"Pogotowie" ) or isPlayerInTeam(plr"Panstwowa Straz Pozarn" then
        team getPlayerTeam plr )
            for _,v in ipairs getPlayersInTeam team ) ) do
                outputChatBox table.concat ( {...}, " " ), )
            end
        else
        outputChatBox "Nie masz uprawnie?"plr )
        end
    end
end
addCommandHandler "Kr?tkofal?wka"Krotkofal?wka 


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-02-14, 15:23


pawel998







Wiek: 35
Na forum: 4261 dni
Posty: 29
Nick w MP: Piotrek101



Respekt: 40,5

Nic :(

Postaw piwo autorowi tego posta
 

 
Tagi: krótkofalówka
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