botanist
Members-
Posts
613 -
Joined
-
Last visited
Everything posted by botanist
-
1: Don't use return before you really want to end the function. Use it at least. Now you are returning, which means "stopping" too, before xmlUnloadFile gets called. 2: Where's the +1 you are talking about? 3: try my weird change: function getCarCount (player) local allIds = 0 local root = getResourceConfig("data.xml") local index = getCarIndex (getAccountName(getPlayerAccount(player)),root) if index then local accountRoot = xmlFindChild (root,"user",index) local idsRoot = xmlFindChild (accountRoot,"car",index) allIds = xmlNodeGetChildren (idsRoot) -- Removed the #, idk if that will end xmlUnloadFile (root) return #allIds -- Heres the # again, idk if this returns 0 if theres no table =/ end
-
You basically want to convert milliseconds to minutes, isn't it? Try diz: function msToMinutes ( ms ) -- Returns ( minutes, seconds ) local sec = ms/1000 -- Converts all MS to seconds local min = 0 -- We have no minutes counted yet if sec < 60 then -- if we have at least one minute repeat sec = sec-60 -- Start counting minutes min = min + 1 -- So add a minute until sec < 60 -- If there are no minutes left end return min, sec -- We are done, and return the minutes and seconds end I haven't tested it, but this should work.
-
So you already have a song? If you do, here's a simple tutorial: First, you need to put the song into your resource. Then, add it to your meta.xml which should be located into your resource. You can do that by placing this code between the tags. <file src="music.mp3" /> Then, create a new clientside script and add an event handler. For example, we will use onClientResourceStart: This will be triggered when the resource starts, or you join the server. addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource ( ) ), startSound ) There we added the event, which will only be triggered if THAT resource starts. If it's get triggered, this event will trigger the function startSound (), so lets make that now. function startSound ( ) -- Adding the function playSound ( "music.mp3", true ) -- "music.mp3": the path to your music. This is the same path that you defined in meta.xml. -- true: This will represent if the music will be repeated after it has been ended. True for "yes", false for "no". end -- Ending the function ofcourse So, that's all you need to know for a beginner. It's all about adding the music to your meta.xml, and using playSound wherever you want. You could also use the iPod, which is downloadable on the community. This doesn't need any script experience Download.
-
I really like the idea of 3d scene in the menu, with something what Zango said. We could use different positions, so the client will see everytime a new scene and he won't get bored. And, San Andreas needs to be loaded when MTA starts for that. This makes onPlayerConnect unneeded, since the player will join directly. That will force us to put the parameters of the event in onPlayerJoin, which will provide us with easier scripting. Though, if the old type of 3d scene is coming back, that was in DM, I am strongly against it. I really didn't like that scene, and it was very crashy. And it was always the same > boring
-
Do you know enough players to test it? MTA has an 3200+ player record, by far not the 65535+ as it can now. The only way to test it, is to get way more players, or simulate a lot of players in some way. Or there needs to be a way I don't know about
-
It's real. In fact, MTA can even support an infinite amount of players. It's just that the GTA engine, or MTA engine probably can't handle too much players. But afaik, they don't know that yet.
-
Exactly. SA:MP gets trapped by MTA. BAM!
-
No, not. 1000 will be the max then.
-
Google Code.
-
Do you have something better which is easy to use then?
-
It will save the current configuration of the vehicle, in a XML file located on the server. This is saved by the players Serial & name, so you will be able to use(load) your handlings later again - without needing an account.
-
About the updates: omg! We just have a player limit of 65535 LOL!
-
Oh, I would really appreciate that Haha, ideas ftw! Thanx, Almost everything is working. I only need to change some inputs to dropdown widgets, so there can't be a mistake. And some other buttons need to work too. ______________________________________________________________________________________________________ Also, I've added comboboxes for stuff that only can be certain things. Like strings and bools. Would be nice if those comboboxes get support to trigger every GUI event, just like every GUI element can do too. Would be useful for this tool either, since I will be able to output information about the settings in comboboxes.
-
Aha, I think that needs a scripting request. You could use F1 till the MTA dev is going to add support for that. F1 is commonly used in most gamemodes, as you already know ofcourse And to go back on the quit player: You could kick the player with reason: "You have been disconnected.", and check that reason in on(Client)PlayerQuit so you are able to output a quit message, instead of kick message. That's how I would do it.
-
1: Crashing the player? When do you want to disconnect the player? When he's already playing, or before he joins? 2: Afaik, you can only check that, not setting or disabling it, cmiiaw. But what's your purpose? You could move the player to another place if he pressed the ESC button.
-
Do you really think hundreds of pages are changed every day?
-
Well, keeping up to date isn't too hard. Just watch the page you translated, and check the state of it sometimes. Besides that, you can get a openID even when you haven't got an openID compilable service, or mail. You can always attach your current mail address to a new Google account, without creating a new mail.
-
Wierd. Then I must be happy that I only need the value 100
-
Why not? Easier to make a link in it to our resources, announcements or anything.
-
Lol, I started already with it. Not that it's gonna be finished fast, but still. Shall I use keyboard functions, or also mouse functions so it can even be easier to make a mission?
-
Check out the GitHub page to see the latest and smallest changes done! Current stable release SERIOUS NEED FOR DEVELOPERS! Please help contribute! A while ago, I read on the wiki something about Handling Functions. I discussed that with a friend, and he advised me to make a handling editor, so you can see I did. I've done some research, and found out that the Handling Functions will be released alongside MTA 1.1. And that's what inspired me to create this. The first, and the best Ingame Handling Editor - userfriendly, and stylistic See all exported functions & events on the HandlingEditor wiki page. ______________________________________________________________________________________________________ Download the latest package from here. If you are experienced with Git, you can also clone the repository here: SSH[[email protected]:Deltanic/Hedit.git] | HTTPS | SVN. ______________________________________________________________________________________________________ You will see: At the left all config buttons, and a help page button. Beneath that, the save/load/import/reset buttons. In the middle you will see a lot of buttons. You can click those buttons to change the handling of it. Note: Almost everything is empty because the MTA Handling Functions aren't released yet, and I'm simulating the functions. Beneath those buttons you see the output of hovers and clicks. Here it show what to use for the amount of gears. Note: Was a little bug, it's now only showing when editting. And take a look at the Log GUI in the first picture: I've used too much gears. It outputs an error message, and the data will not be changed. Then I've did too less gears. Same story again. Now I've successfully changed the amount of gears to 6. After that, I tried to use a string instead of number. Won't work, as you see At last, I tried to set the same amount again. But it was already 6, so it would be useless to set it to 6 again. And it won't be set. Epic debug, isn't it? On the second picture you will see: The new comboboxes, still with a GUI with round edges. And on the third picture you'll see: A whole config that's changed! Besides, everything is square. This due the new GUI style included with r2113n and above. Also, on the fourth picture: The whole new utilities bar. Works just like it does in Windows! And already the third demonstration video, showing the new gui, saveload functions, vehicle-log, and flag support!: See here for a list of all development video's. There needs to be more triggers for comboboxes, not only onClientGUIComboBoxAccepted. They should trigger every GUI event, just as every other GUI element does too. Would be useful for this tool either. ______________________________________________________________________________________________________ And, a roadmap to let you guys know where I'm working on. Be sure to check the GitHub page too, to be aware of the latest and smallest changes! Strike = Resolved and available in the latest Git commit. Italic = Resolved but waiting to be comitted to Google Code due to other stuff.
-
I already thought of DYOM. Indeed it's very hard, and a lot of work, but I got exactly in my head how to do this. Though I'm not going to yet, such a mod will take too much time of my other projects. After those projects, I'll make it. I'm able to. I'll prove it
-
get/setAccountData, can also be used when not logged in, or no password is specified.
-
[Wiki] Wrong categories & Uploading images
botanist replied to botanist's topic in Site/Forum/Discord/Mantis/Wiki related
Like [[Category:Needs_Example]] ? That doesn't do the job, and to other pages 1.1 func pages it does show right. But the page source doesn't show anything about an 1.1 category..?
