Ist mir so noch gar nicht aufgefallen. Aber schön, dass es scheinbar noch mehrere betrifft. Und herausgefunden habe ich, dass es an IPv6 und NGINX liegt. Wie ich das beheben kann, weiss ich bisher noch nicht. Aber ich arbeite dran.
Weil deine Funktion eine falsche Reihenfolge der Parameter entgegen nimmt. Füge zwischen player, target einen weiteren Parameter ein z.B. cmd.
Lua
function addElementData(player, cmd, target, element, amount)
Dann hast du zwar die erste Hürde überwunden, doch der Rest wird dann leider noch nicht stimmen.
Denn die Idee mit dem element-Parameter wirst du so denke ich nicht umsetzen können, da es sich bei dem Parameter um keine Table handelt, sondern um einen String.
Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
Multi Theft Auto: San Andreas 1.5.8 is released
Happy autumn! We've been working hard and today we're proud to announce the release of MTA:SA 1.5.8. You will receive an automatic update soon, but if you don't have MTA installed, you can get it from the home page.
This release is (mostly) backwards compatible with the older 1.5.x releases (1.5.7, 1.5.6, all the way to 1.5).
If you're a server owner, please take note of the Changes in 1.5.8 wiki page, more specifically the Backwards Incompatible Changes. You may need to update your scripts for 1.5.8.
We now have a Twitch channel and @Woovie has been streaming almost daily the past week. We won't be streaming every day going forward, but do expect it pretty often!
Added wheel scaling functions (#1641, #1644, and #1648 by AlexTMjugador)
Read the 1.5.8 release notes for a complete set of changes and more information about the improvements listed below. Watch or star our GitHub repository to keep on top of all the things we're working on. Below is a very small subset of what we've improved:
Important future script changes
From 1.6 onwards we will be making at least the following changes:
callRemote callbacks currently set the error code to nil when there is no error. In 1.6, to be consistent with fetchRemote, the error code reported will be 0. See GitHub #294.
Since July 2016 if you provide an invalid string like "randomstring" when a function expects a number, the string will be treated as 0 and raise a script warning. In 1.6 this will be an error. You will still be able to provide strings containing numbers (e.g. "100" and "12.34"), this change only affects invalid strings. See GitHub #1043.
When providing a width and height of (0, 0) to createBrowser or guiCreateBrowser you will encounter a script error instead of a warning. The warning was introduced Feb 2019. See GitHub #1069.
Some functions expect only unsigned integers (positive numbers), and since Jan 2016 providing negative numbers would be a warning. This will now be an error. See GitHub #1070.
This list is inconclusive and we may introduce more changes later.
What's next?
Multi Theft Auto depends on community input and contributions. To keep a project like MTA going we need LOTS of people. You can help in the following areas:
Testing and bug reporting
Whenever you encounter a bug or recognise a need for improvement, we can't fix it until you tell us your problem!
We're continually working on new features and fixes for MTA, and this always needs testing. Join our Nightly release stream and make sure you keep in touch with on Discord and report issues on GitHub.
Programming
If you know C++ you may be interested in helping improve Multi Theft Auto's client. Working on open-source software may seem scary, but the best way is to try! Read GitHub's open source guide, and then find an itch to scratch, or scratch your own!
Documentation
Documentation is important, but also time consuming. If you enjoy writing and have some knowledge of English, or you would like to translate the English version to your native language, you’re very welcome to do so. Just head over to our wiki, create an account, and start editing!
Support
Do you like people? Can you give calm and thought-out responses to users needing help? Then you can spend some time providing support to those who need it. Many answers can be found on our wiki, so make sure to take some time to read it. Then, either join our chat or forums (linked below), or simply help us sort out issues and answer questions on the GitHub repository.
Translation
Want to translate MTA to your own language? Awesome! Visit us on Pootle. As soon as your translation is approved, it will be pushed to our repository for use in future releases.
Donations
Keeping the MTA downloads, master server and websites alive costs money! If you want to help us sustain our financial expenses, please donate!
Thank you!
Thank you to the following community members for their donations this year:
Thank you very much to the following community members for their work towards this release:
0x416c69, Addlibs, AGraber, AlexTMjugador, ApeLsiN4eG, buepas, colistro123, Disinterpreter, ecastro98, knitz12, MegadreamsBE, pentaflops, PerikiyoXD, theSarrum, Simi23, tederis, TheNormalnij, Zangomangu, and many others who contributed to our wiki and helped out with issues.
(If your name is missing or you want to change your entry above, please let us know on Discord!)
You could be on this list! We're always on the lookout for new contributors. Contribute on GitHub, and chat with us on Discord. We have channels for scripting, general support (bugs), mod development, and many more!
And one more thank you to every member of the MTA staff who helps support this forum and Discord. Without you donating your time, this project would not be nearly as successful as it is now.
Das Zertifikat auf dem Webserver ist effektiv abgelaufen. Entweder stimmt da eine Zuweisung nicht, oder es ist eine Applikation ausserhalb von Plesk. Kenne deinen Aufbau nicht, daher kann ich nicht mehr sagen. Ggf auch verantwortlichen Webserver neustarten.
Das ist prinzipiell richtig. Braucht aber meines Wissens noch mehr, sowas wie acme-challange oder so, auf die Lets Encrypt noch versucht, den Plesk Webserver zu erreichen um den Challange abzuschliessen. Eventuell grad zum erstellen nen Wildcard setzen.
Ja, weil ich leider das bindKey vom oberen Beispiel übernommen hatte, die Funktion jedoch kein Element aus dem Elementbaum entgegennimmt, sondern nur Player.
Der Code muss dementsprechend so aussehen, diesmal sogar getestet (muss Server-Side laufen!!) :
Lua: server.lua
local Gate_1_Object = createObject(3055, 1588.5, -1638.3, 14.6, 0, 0, 0)
local Gate_1_MovedState = false
local Gate_1_MovingState = false
function moveLSPDgate_1(player)
--if (isSTATE(player)) then -- Wo ist die Funktion? Ist die wirklich präsent?
if (getDistanceBetweenPoints3D(1589.65, -1638.4, 14.5, getElementPosition(player)) < 10) then
if (not Gate_1_MovingState) then
Gate_1_MovingState = true
if (not Gate_1_MovedState) then
Gate_1_MovedState = true
moveObject(Gate_1_Object, 3000, 1588.5, -1638.3, 16.5, 90, 0, 0)
setTimer(triggerLSPDgate_1, 3000, 1)
else
Gate_1_MovedState = false
moveObject(Gate_1_Object, 3000, 1588.5, -1638.3, 14.6, -90, 0, 0)
setTimer(triggerLSPDgate_1, 3000, 1)
end
end
end
--end
end
addCommandHandler("gate", moveLSPDgate_1)
addCommandHandler("mv", moveLSPDgate_1)
-- Trigger gate states
function triggerLSPDgate_1()
Gate_1_MovingState=false
end
addEventHandler("onResourceStart", root, function()
for _, player in ipairs(getElementsByType("player")) do
bindKey(player, "h", "down", moveLSPDgate_1)
end
end)
addEventHandler("onPlayerJoin", root, function ()
bindKey(source, "h", "down", moveLSPDgate_1)
end)
NYS Da läuft dennoch einiges falsch. Vorab, der Ansatz ist soweit gut, doch es gibt doch den einen oder anderen Punk zu verbessern.
Warum willst du Clientseitig nen Key an eine Funktion binden, die nicht existiert?
Warum möchtest du auch Clientseitig binden, wenn du das Serverseitig tust? Mehr eine entweder - oder Frage.
Als nächstes solltest du bei onResourceStart nicht root verwenden, da sonst die Funktion bei dem Startvorgang jeder Resource ausgeführt wird. Verwende stattdessen resourceRoot.
Warum sind die Zeiten von moveObject und setTimer unterschiedlich? Sollten meiner Meinung nach eigentlich gleich sein.
Anschliessend gilt dies aber nur für alle Spieler, die bereits verbunden sind. Also müsste man noch ein bindKey auf onPlayerJoin binden. Alternativ zu dem kann man das aber auch Clientseitig erledigen, in dem man einen Command auf eine Taste binded. Also:
Lua
bindKey("h", "down", "gate")
Hier wäre in etwa mein Vorschlag:
Lua
local Gate_1_Object = createObject(3055, 1588.5, -1638.3, 14.6, 0, 0, 0)
local Gate_1_MovedState = false
local Gate_1_MovingState = false
function moveLSPDgate_1(player)
if (isSTATE(player)) then -- Wo ist die Funktion? Ist die wirklich präsent?
if (getDistanceBetweenPoints3D(1589.65, -1638.4, 14.5, getElementPosition(player)) < 10) then
if (not Gate_1_MovingState) then
Gate_1_MovingState = true
if (not Gate_1_MovedState) then
Gate_1_MovedState = true
moveObject(Gate_1_Object, 3000, 1588.5, -1638.3, 16.5, 90, 0, 0)
setTimer(triggerLSPDgate_1, 3000, 1)
else
Gate_1_MovedState = false
moveObject(Gate_1_Object, 3000, 1588.5, -1638.3, 14.6, -90, 0, 0)
setTimer(triggerLSPDgate_1, 3000, 1)
end
end
end
end
end
addCommandHandler("gate", moveLSPDgate_1)
addCommandHandler("mv", moveLSPDgate_1)
-- Trigger gate states
function triggerLSPDgate_1()
Gate_1_MovingState=false
end
addEventHandler("onResourceStart", root, function()
bindKey(root, "h", "down", moveLSPDgate_1)
end)
addEventHandler("onPlayerJoin", root, function ()
bindKey(source, "h", "down", moveLSPDgate_1)
end)
Durch ein automatisiertes Buildsystem wird nun immer die aktuellste Version in der Registry verfügbar sein, welche auf https://linux.mtasa.com/ angeboten wird.
In näherer Zukunft werden noch die Kapitel Update und docker-compose ausgerabeitet.