Heyho MTA-Community,
Ich habe da ein kleines Problem:
Ich möchte eine Sirene(Sound) einfügen allerdings läuft diese nicht...
Ich habe folgenden Code in meiner horn.lua:
function horn()
bindKey(source, "h", "down",
function(player, key, state)
if isPedInVehicle ( player ) then
local x, y, z = getElementPosition(player)
if ( siren ) then
destroyElement ( siren )
else
siren = playSound3D ( "Feuerwehr_Martinshorn.wav", x, y, z, true )
end
end
end
)
end
addEventHandler ("onResourceStart",getRootElement(),horn)
Alles anzeigen
Ich habe schon die datei in der meta.xml als type="server" und als type="client" laufen lassen aber irgendetwas muss falsch sein.
Im log werden keine Fehler angezeigt bezüglich des Scripts:
Server-Log
==================================================================
= Multi Theft Auto: San Andreas v1.5.4 [64 bit]
==================================================================
= Server name : 2nd Life Roleplay | TeamSpeak: 37.228.132.68
= Server IP address: 5.189.139.250
= Server port : 22003
=
= Log file : ..serverfiles/mods/deathmatch/logs/server.log
= Maximum players : 80
= HTTP port : 22005
= Voice Chat : Quality [4]; Sample Rate: [16000Hz]
= Bandwidth saving : Maximum with lightweight sync rate of 1500ms
==================================================================
[2017-05-17 13:07:53] Resource 'acpanel' requests some acl rights. Use the command 'aclrequest list acpanel'
[2017-05-17 13:07:53] ERROR: Couldn't find script server/admin_acl.lua for resource admin2
[2017-05-17 13:07:53] Loading of resource 'admin2' failed
[2017-05-17 13:07:53] WARNING: Ignoring duplicate client script file in resource 'editor_gui': 'client/orderedPairs.lua'
[2017-05-17 13:07:53] WARNING: Ignoring duplicate client script file in resource 'editor_gui': 'client/vehicleupgrades.lua'
[2017-05-17 13:07:54] ERROR: Problem with resource: cam; Failed to link to helpmanager
[2017-05-17 13:07:54] ERROR: Problem with resource: editor; Failed to link to mapmanager
[2017-05-17 13:07:54] Resources: 34 loaded, 2 failed
[2017-05-17 13:07:54] MODULE: Loaded "MySQL 5.0 database module" (0.50) by "Alberto Alonso <[email protected]>"
[2017-05-17 13:07:54] Starting resources...
[2017-05-17 13:07:54] Please wait...
[2017-05-17 13:07:54] Please wait...
[2017-05-17 13:07:56] INFO: 110 Cars loaded in Carhouse!
[2017-05-17 13:07:56] INFO: # 0 House Wishes loaded!
[2017-05-17 13:07:56] INFO: # 136 Houses loaded!
[2017-05-17 13:07:56] INFO: # 30 Interior-Rooms loaded!
[2017-05-17 13:07:56] INFO: # 17 Prestigeobjects loaded!
[2017-05-17 13:07:56] INFO: Baustelle mit ID 15 wurde geladen!
[2017-05-17 13:07:56] INFO: Baustelle mit ID 18 wurde geladen!
[2017-05-17 13:07:56] INFO: Baustelle mit ID 17 wurde geladen!
[2017-05-17 13:07:57] INFO: # 50 Sprunkautomaten loaded!
[2017-05-17 13:07:57] Server minclientversion is now 1.5.4-9.11324.0
[2017-05-17 13:07:57] WARNING: admin/client/gui/admin_main.lua(Line 428) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead.
[2017-05-17 13:07:57] WARNING: admin/client/gui/admin_spectator.lua(Line 263) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead.
[2017-05-17 13:07:57] Some files in 'admin' use deprecated functions.
[2017-05-17 13:07:57] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-05-17 13:07:57] Querying MTA master server... success! (Auto detected IP:5.189.139.250)
[2017-05-17 13:07:57] Authorized serial account protection is enabled for the ACL group(s): `Admin` See http://mtasa.com/authserial
[2017-05-17 13:07:57] Server started and is ready to accept connections!
[2017-05-17 13:07:57] To stop the server, type 'shutdown' or press Ctrl-C
[2017-05-17 13:07:57] Type 'help' for a list of commands.
[2017-05-17 13:08:25] CONNECT: Jan_Peters connected (IP: 109.***.***.*** Serial: ********************************************** Version: 1.5.4-9.11324.0)
[2017-05-17 13:08:25] JOIN: Jan_Peters joined the game (IP: 109.***.***.***)
[2017-05-17 13:09:48] Jan_Peters logged in!
Danke schonmal im voraus