Witam mam problem otóz gdy dana osoba (gracz) wpisze /Taxi To pisze Dostałes wezwanie Spojrz na mape i chciałbym zzrobić tak żeby To się wyswietlalo danej frakcji a nie wszystkim.
Daje tu kod:
function taxiCommand ( thePlayer, command )
local team = getTeamFromName ( "Taxi" )
local gracz = getRandomPlayer ()
local taxit = getPlayersInTeam ( team )
local ile = countPlayersInTeam ( team )
if ile == 0 then
outputChatBox ( "Aktulnie nie ma taksowkarzy na serwerze. Przepraszamy!", thePlayer, 255, 0, 0, false )
else
outputChatBox ("Taxi jest juz w drodze", thePlayer, 255, 255, 0, false )
if getPlayerTeam ( gracz ) == team then
blip = createBlipAttachedTo ( thePlayer, 53, 1, 255, 0, 0, 0, 0, 99999.0, taxit )
outputChatBox ("Masz klienta! Patrz na mapke!", 255, 255, 0, false )
end
end
end
addCommandHandler ( "taxi", taxiCommand )
function taxiCancelCommand ( thePlayer, command )
local team = getTeamFromName ( "Taxi" )
local gracz = getRandomPlayer ()
local taxit = getPlayersInTeam ( team )
outputChatBox ("Taxi odwolano", thePlayer, 255, 255, 0, false )
destroyElement ( blip )
if getPlayerTeam ( gracz ) == team then
outputChatBox ("Twoj klient odwolal taxi.", 255, 255, 0, false )
end
end
addCommandHandler ( "taxix", taxiCancelCommand )
function allTaxiCancelCommand ( )
local team = getTeamFromName ( "Taxi" )
local gracz = getRandomPlayer ()
local taxit = getPlayersInTeam ( team )
if getPlayerTeam ( gracz ) == team then
destroyElement ( blip )
outputChatBox ( "Usunieto punkty na mapie.", taxit, 255, 255, 255, false )
end
end
addCommandHandler ( "usuntaxi", allTaxiCancelCommand )
..........................
Proszę bardzo o pomoc.
..........................