Wysłany: 2015-02-13, 15:13
pawel998
Wiek: 35 Na forum: 4262 dni Posty: 29
Nick w MP: Piotrek101
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!
Wysłany: 2015-02-13, 17:19
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Sprawd? i napisz :
function isPlayerInTeam ( player , team )
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 ? wka ( plr , cmd , ... )
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 ( {...}, " " ), v )
end
else
outputChatBox ( "Nie masz uprawnie?" , plr )
end
end
end
addCommandHandler ( "Kr?tkofal?wka" , Krotkofal ? wka )
Wysłany: 2015-02-14, 15:23
pawel998
Wiek: 35 Na forum: 4262 dni Posty: 29
Nick w MP: Piotrek101
Nic
Tagi: krótkofalówka
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: