Hallo zusammen,
ich habe seit einigen Tagen einen MTA DayZ Server und möchte nun jede ~ 10 Minuten eine Nachricht im Chat ausgeben lassen.
Ich habe bereits woanders geschaut und einen Codeschnipsel gefunden. Nun habe ich alles soweit hochgeladen, die Resource gestartet.. aber es kommt nichts!
LUA:
Code
function ServerNewsSend()
outputChatBox("test",getRootElement(),255,230,0) -- getRootElement() = wird an alle Spieler gesendet die Online sind.
outputChatBox("test",getRootElement(),255,230,0)
outputChatBox("NACHRIfdsfCHT",getRootElement(),255,230,0)
outputChatBox("NACHRfsdICHT",getRootElement(),255,230,0)
outputChatBox("NACHRsfddsICHT",getRootElement(),255,230,0)
end
setTimer ( ServerNewsSend, 1000, 0 ) -- 1000000 ist dann die zeit wann es immer gepostet werden soll, 1000 = 1 Sekunde
1000 ist extra gewählt.. zum Testen.
META:
Was mache ich falsch? Ich habe die Dateien hier hochgeladen:
/mta/mods/deathmatch/resources/send
(send.lua und meta.xml)
Fehlermeldung im Log:
Code
[2013-01-22 14:41:49] ERROR: Couldn't find script server/admin_acl.lua for resource admin2
[2013-01-22 14:41:49] Loading of resource 'admin2' failed
[2013-01-22 14:41:50] Resources: 123 loaded, 0 failed
[2013-01-22 14:41:50] Querying game-monitor.com master server... failed! (302: Moved temporarily)
[2013-01-22 14:41:50] Querying backup master server... success!
[2013-01-22 14:41:50] Starting resources.................
[2013-01-22 14:41:54] ERROR: exports: Call to non-running server resource (scoreboard) [string "?"]
[2013-01-22 14:41:54] Creating new DB table gangs
[2013-01-22 14:41:54] Creating new DB table gang_members
[2013-01-22 14:41:55] Server started and is ready to accept connections!
[2013-01-22 14:41:55] To stop the server, type 'shutdown' or press Ctrl-C
[2013-01-22 14:41:55] Type 'help' for a list of commands.
[2013-01-22 14:42:42] CONNECT: Tommy connected (-)
[2013-01-22 14:42:42] JOIN: Tommy joined the game (-)
[2013-01-22 14:42:58] LOGIN: (Admin, Everyone) Tommy successfully logged in as 'Tommy' (-)
[2013-01-22 14:42:58] ERROR: survivorSystem.lua:315: attempt to perform arithmetic on local 'oldValue' (a nil value)
[2013-01-22 14:42:58] WARNING: @survivorSystem.lua:267: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil]
[2013-01-22 14:42:58] WARNING: @login.lua:147: Bad argument @ 'setElementModel' [Expected element at argument 1, got number '287']
[2013-01-22 14:43:09] Starting send
[2013-01-22 14:43:09] start: Resource 'send' started
[2013-01-22 14:43:09] ADMIN: Resource 'send' started by Tommy
Alles anzeigen
Was mache ich falsch?