-
Posts
1,031 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Bonsai
-
First of all "t = tonumber(t)" has to be removed then. Then you need a function to get the player from a part of his nick only, as having to typ the whole nick can be pretty annoying. https://wiki.multitheftauto.com/wiki/Ge ... omNamePart
-
Hey, Sorry in case this was posted before somewhere. I just discovered that MTA crashes whenever I click Enter in an empty console. Tested that on a few different servers. In Main menu it doesn't happen as it seems, but it outputs some error message: This is what I get after the crash: Version = 1.5.2-release-7967.2.000 Time = Sun Apr 24 17:54:16 2016 Module = C:\Program Files (x86)\MTA San Andreas 1.5\mta\netc.dll Code = 0xC0000005 Offset = 0x00076AAE EAX=01770079 EBX=0000000C ECX=00000065 EDX=0177E9A3 ESI=0177E998 EDI=00000048 EBP=00000000 ESP=0177E964 EIP=0C626AAE FLG=00010246 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B Bonsai
-
Do you mean something like getPlayerFromName?
-
You might need to go through the basics again. Those dx functions don't return anything useful. local nm = nm That seems kinda wrong too. And the rest.. remove the if else from the render function and put that in the other one for the start.
-
You would switch between the positions and update a different screen source every time I guess. This will cut your fps in half and will cause even bigger problems when the two positions are too far from each other. Search for rear view mirrors resources for an example. Seems cool at first but brings too many problems.
-
They best way would probably be to put them the same way as you put the "local sw,sh" variables. They are available in the whole script file, as long as they are outside of a function. Without the "local" they would be available in every script file e.g. all client-side scripts, of the resource. http://lua-users.org/wiki/ScopeTutorial
-
Just make them global variables I guess. Then the drawDialogue function would not just start the rendering but also do the checks and set the values.
-
Yeah, thats what I thought too before I posted here. But the problem was not reproducible, and especially the delay problem can't be caused by a problem in the code I think. After I remade some part, it became a bit better because I got rid of one callRemote usage, so you wouldn't see a problem that often. Maybe the hoster was having a problem or something? Right now its working pretty good. Thanks again. Bonsai
-
So I did as you said and did some tests with it. There was not a single error shown. As far as I understood it only tries to send once. Does that have any effect on the following messages? Like as long as the first message was not successfully sent, the second one won't be taken care of? But it should have shown an error anyway if it didnt get through. So, I really i don't why i had these huges problems before, i feel like it got better after I changed something, but sometimes it still has huge delays. I'll do some more tests with this tool later to make sure. Thanks for your help. Bonsai
-
Hm, sadly there is no such error..
-
I now added the server ip to the mta config file for: <http_dos_exclude></http_dos_exclude> I'm not sure yet if it helps anything tho. Bonsai
-
They both have the same ip, but different ports. Its using the HTTP port from the config file, which in this case is the same as the server port.
-
No, its only used in that one resource. But it might be used several times in a short amout of time, like when u try to send more messages.
-
Hey, I was trying to use callRemote to exchange messages between servers, but sometimes there is a HUUUGE delay or the message doesnt reach the other server at all. So, is that something that can be fixed? Is this happening because of some internal MTA stuff? I tried to use the socket module, but for some reason there is no way to listen on a socket, which makes them kinda useless. And the curl module is not available for linux servers. Anyone knows what to do about this? Bonsai
-
Try https://wiki.multitheftauto.com/wiki/Ge ... enPoints2D.
-
Hey there, is the Curl module also available for Linux servers? I can't find it anywhere, most of the links don't work anymore. https://wiki.multitheftauto.com/wiki/Modules/cURL Bonsai
-
I'm having exactly the same problem right now. I'm trying to use sockets to send data between resources on different servers. I also found another module for sockets, but didn't try it out yet. https://forum.multitheftauto.com/viewtopic.php?f=108&t=46338 Maybe someone can tell me if this is correct way to do it: I create a socket on server A with the address of server B and vice versa. If I write data to the socket on server A now, shouldn't server B receive it? Bonsai
-
I don't even have this version anymore. I made some changed from time to time but never put it online for download.
-
Do not delete posts after they were solved. There should be something like.. auto quote first posts :c
-
Hm, you could use an array, so each player gets its own number.
-
Debuuuuuuuuuuuug output
-
If you throw scripts at people instead of advices, they should better be working. if getElementType("trailer") then setElementPosition(trailer, x+2, y, z) ???
-
Do admins care at all about moderating stuff?
-
Well just read https://wiki.multitheftauto.com/wiki/DbPoll. It might take a while until the result is returned. So you try again until its finished or timed out. And result.value or result["value"] is the same.
-
bindkey( source, "o", "up", unhookTrailer) What is the source there? If its outside of any function, it won't work like that. You could loop through all players and just bind the key for each of them. Also you should probably rather name the first parameter of the unhookTrailer function "player" instead of "source", since "source" is predefined when working with events.