function wyzwanie(komenda, cel)
if cel then
gracz = getPlayerName(getLocalPlayer())
nick = getPlayerFromName(cel)
if (setElementData ( getLocalPlayer(), "gracz.wyzwany", "tak" )) and (setElementData ( cel, "gracz.wyzwany", "tak" )) then
outputChatBox("Wyzwa?e?/a? gracza "..cel.." na wy?cig!", getLocalPlayer())
outputChatBox("Gracz "..gracz.." wyzwa? ci? na wy?cig! Wpisz /akceptuj by zaakceptowa? wyzwanie", nick)
else
outputChatBox("B??d przy ustawianiu gracza ?e zosta? wyzwany", getLocalPlayer())
end
else
outputChatBox("WZ?R: /"..komenda.." [Nick Gracza]", getLocalPlayer())
end
end
addCommandHandler("wyzwij", wyzwanie)