![](https://forum.multitheftauto.com/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
robhol
Retired Staff-
Posts
2,120 -
Joined
-
Last visited
-
Days Won
1
Everything posted by robhol
-
There is no place. There are hundreds of these topics, usually at least one new per day, and the answer never changes. If you want scripting done, do it yourself, or pay people.
-
More than 2 people might have the same amount. As for the code: - unnecessary function currentPlayer, you're also calling it in a way that makes no sense - don't use "source" as a variable name, just in case - use local variables when you can - use return values instead of assigning global variables
-
Loop through players, check money (getElementData or actual money functions). Grab the first player you encounter, stuff into a variable. Then check every other player - replace the one in the variable if the current one has more money. At the end of the loop, you'll have the player with the most money.
-
Where is "player" being declared? Debugscript 3 and post results. You're after the THIRD, not the first argument of getGroundPosition. (Edit: oh, and make your temporary variables local)
-
That's not a scripting issue. What do we know about random resources?
-
You should probably mention how much you're willing to pay, either an hourly rate or a set price for a given set of goals. Also, the phrase "no large sums" does generally not sound too promising.
-
VB isn't useless, it's just ugly and never the optimal solution. Can we stop the sarcastic arguing now? It's really irrelevant.
-
This actually happens in single-player, too, and is just as annoying there. Are you on Win7? I run win7 x64. (Just saw that the topic is actually old and that the person who wrote the spambot that revived it must be retarded - still, if anybody knows how to solve this?)
-
Code and error messages..?
-
Also, string.format and really quite a few different ways. When it comes to general Lua stuff, you'll usually get a quicker answer on Google, though.
-
Based on the mod's performance in general, I think you might be better off not doing that, but that's totally up to you.
-
He did already post an error, but a verbatim copy would be nice. Anyway, Lua is a bad language for OOP (half-assed and less-than-intuitive implementation) and MTA's API doesn't really go well with it either. How about sticking to procedural-style programming?
-
I remember seeing that drawtag script years ago, it blew my mind. Very impressive.
-
It's not strange at all - the thing is that MTA hooks into the memory of the running GTASA process. It uses a bunch of addresses that were derived from the 1.0 exe. When you have a different EXE file, those addresses and offsets are suddenly dead wrong. Instead of deriving and tracking those offsets for half a dozen different exes, you just require a 1.0 exe. Admittedly, nocd patches are kind of a grey area, but you probably won't end up in the slammer for patching a 6/7 year old game.
-
Unless I'm very wrong, you should be fine by just downloading a v1.0 EXE - a lot of nocd patches are 1.0, for example. Saves you the extra hassle of downgrading as a separate step.
-
Not gonna happen. There's sort of a deficit of people who actually can tell "if" from "setElementData" and "onClientPreRender" from their own anus, and none of them is likely to work for you for free. Edit: that's not to say that nobody will help you - you just need to ask concrete questions and provide useful information.
-
Figure out exactly what the script is supposed to do before you try writing it - explain as thoroughly as possible.
-
I can't pretend to know what, exactly, that self thing means. When coding OOP, I prefer it to be... err, proper OOP? Looks like it's causing some problems though. For starters, how about a proxy function that calls the method? Assigning that method to a local variable and using that, on the off chance that the self: stuff is causing issues with the addEventHandler call?
-
Whoa. I think you might be about to bite off more than you can chew. Making a multiplayer mod involves a TON of quite low level code, tampering with compiled code, patching memory, in some cases messing with assembly. There are lots of memory addresses you'll need to find, and learn how to manipulate. Unless you have a lot of experience in reverse engineering, network programming and the inner workings of GTA, I suspect you might be better off finding a different project - or, say, helping with this one.
-
I can't really say that I understand what the problem is. "I need to add a handler to a method, and it's the only way to use the function, with methods." doesn't really tell us what's wrong, why it's wrong, or what you're trying to do.
-
I don't really understand the problem. Streamer memory is only the cap for what the game engine can load (I think..?). You can decrease it if you need to, but you don't need to increase it, so it doesn't let you. What is the problem you're experiencing, and why not mention it before?
-
What are you talking about? What map? When they die where? What modes are involved? Anyway, this might not exist, meaning that you'll either have to script it yourself or pay someone.
-
"I need it" is a beyond crappy answer. If you don't want to answer people's questions, how do you expect to get any help?
-
The failing maps have invalid characters in them - something the error message tells you pretty clearly. What are you trying to do here, and why do you need a table for each map?
-
Text commands are server-side and kind of old, I think the client-side dx functions are generally somewhat better.