
Gamesnert
MTA Contributors-
Posts
2,035 -
Joined
-
Last visited
Everything posted by Gamesnert
-
Makes sense, because someone's gotta tell your server to do this... Learning to script in Lua Learning to script in MTA Learning to script in MTA (alternate) Scripting is easy to learn, and you get to know so much about how your server works and how to use it efficiently. Besides that, if people don't get anything for it, people quite often won't do anything for you. That's just how the world works. (Or at least how humans do)
-
In that case, you'll have to use accounts. Click on me = win! (Note: You'll need to script it yourself, unless it's publicly released)
-
There's a folder in the admin resource called "conf", inside there is a file called "settings.xml" (or "settings" if extensions are disabled) Open it with notepad
-
Go to the resources folder of your server. Open the "admin.zip" file. Then go to conf/settings.xml, and remove this line: Just remove it, admin will update your ACL.
-
Are you sure you've installed the "server" component during 1.0 installation? And for connecting from the internet, you need to make sure port 22010 is open, then him give your IP. (You can find your IP HERE)
-
Could you perhaps use a wire for a moment instead of wireless? Just to see if it's the problem.
-
If I look at the image, and look at the distance between the T-shirt and the bottom, it seems exactly equal to the empty space above the bar. This means you've got one thing wrong: local positionOnBar = distanceFromPlayerToFinish/distanceFromStartToFinish*((y/1.2)-(y/4)); Note that it's called positionOnBar. You do it perfect, except that you forget to add the line's start position! To fix this: (well, probably) local positionOnBar = y/4 + distanceFromPlayerToFinish/distanceFromStartToFinish*((y/1.2)-(y/4));
-
I'm kind of having difficulty to understand you, but for as far as I can see you're saying that you crash on connect.
-
/login ([account name]) [password]
-
Start to finish. I thought that would be quite clear... Blergh, apparently not. I guess I have to be a bit more clear about my names next time.
-
You can do it by fairly simple calculations: local positionOnBar = distanceFromPlayerToPoint / distanceFromPointToPoint * barHeight Basically it, for as far as I know.
-
Issue 4863 It's a known issue. It seems not to work whether you do it right or wrong.
-
Storing in SQL database cash of a player on logout
Gamesnert replied to AlexMiller's question in Server
There's nothing wrong with SQL, but if you want to use accounts, it might be a better idea to use the account functions instead. In this way, instead of constantly querying SQL, you can simply do getAccountData to retrieve something and setAccountData to set it. Simple as that. The only issue here is that you need to get the player's account. You do this with, guess what, getPlayerAccount. (It's not in the list here, because it's classified as a "player" function instead of an account one, due to its name) Because it's simply easier to do... local acc=getPlayerAccount(player) if not isGuestAccount(acc) then -- Make sure he actually logged in, it's kinda useless otherwise setAccountData(acc, "cash", 9001) -- It's over 9000! setAccountData(acc, "cheeze", "is spelled wrong") end -- Btw, in case you didn't know, you can remove the pieces of text after the --, they're just comments ...than your code. SQL is just more useful if you want to store something non-related to accounts. (i.e. race times, vehicle data etc) -
Make sure you have "Hide known file extensions" (or something like that) disabled in "Extra>Folder options>View" (or something like that) After that it should show ".txt" behind it. Now, just delete that from the name, windows will whine a little "ohnoes you're changing file extension" just click yes and done. Pwew.
-
Replace addEventHandler with bindKey. (Note, also replace the arguments, in case you thought it'd work with the same args )
-
I can remember the freeroam panel (F1) having some sort of stats tab where you could set it? Otherwise try this: Do "/start runcode" and then paste the following line into the F8 panel: Note: Where I entered "YOUR NAME HERE" should be your name. (Keep the "" there though!) This would set your bike stat to maximum. Not the most userfriendly way, but overall should work.
-
How about complaining to MTA devs to fix it?
-
Looks like you're trying to use the DP2.3 version in 1.0. Otherwise, could you please show the real error?
-
... Which is exactly why you should do it.
-
How about: addEventHandler("onPlayerJoin",getRootElement(), function() setTimer(giveMoneyz,10000,0,source) end end P.S. onPlayerLogin also doesn't have a player argument there. What's you've called "player" was actually the player's account before he logged in.
-
Using math.random you can let Lua pick a random number. Like: local randomNum=math.random(1,3) if randomNum==1 then outputChatBox("Cookie") elseif randomNum==2 then outputChatBox("Cake") else outputChatBox("Crackers") end You can use pretty much the same method as I described above to make the spawns random.
-
function updatemoneypl (player) ... addEventHandler ( "onResourceStart", getRootElement(), updatemoneypl ) I've always been wondering this: Where the heck do ppl get the "player" from at onResourceStart? D: Just so you know, onResourceStart doesn't have a player argument, and therefore doesn't have the capability to work in the way you've given. I don't really see what you want to do either, perhaps if you know what you need you can find an event which is suited for your intended use.
-
I just get my brains burned on some weird thing that tags don't seem to support XML syntax anymore... Rewrote it so many times I just dumped it right as it was but with