Guten Abend Community,
Habe ein Problem mit der "contracts_func" Funktion.
Was ist hier dran falsch?
Lua
function contracts_func ( player )
if isHit(player) then
outputChatBox ( "Auftraege ( Die ersten 3 werden angezeigt ):", player, 200, 200, 20 )
for id, playeritem in ipairs(getElementsByType("player")) do
if vioGetElementData ( player, "loggedin" ) == 1 then
local contract = tonumber ( vioGetElementData ( playeritem, "contract" ) )
local i = 0
if contract >= mincontract then
local i = i + 1
outputChatBox ( getPlayerName ( playeritem )..", Belohnung: "..contract, player, 200, 200, 20 )
if i == 3 then
break
end
end
end
end
else
outputChatBox ( "Du bist kein Hitman!", player, 125, 0, 0 )
end
end
addCommandHandler ( "contracts", contracts_func )
Alles anzeigen
Ich gebe /contracts ein und nichts passiert. (= Es hat vorher einer ein mit /contract in die Liste gestellt. )
M.f.G