
Gamesnert
MTA Contributors-
Posts
2,035 -
Joined
-
Last visited
Everything posted by Gamesnert
-
There are right HERE. Click the "multitheftauto_resources-r74.zip" link to download them. They're pretty recent. (only 1 revision doesn't seem to be packed) And it even seems to include the new map editor. (type "start editor" in the server console when you unpacked everything in the resources folder to start it)
-
Anyone having a tutorial for the new MTA Map Editor?
Gamesnert replied to Madalin2009's topic in DM Client-side
Yes but it doesn't support markers, spawnpoints, pickups etc. for race yet. Anyway, a map editor manual can be found on the wiki. Right HERE. -
Anyone having a tutorial for the new MTA Map Editor?
Gamesnert replied to Madalin2009's topic in DM Client-side
There's also a gamemode called race, remember? -
Better: setVehicleEngineState
-
Just a longer and better description should be enough. Better english is still seriously recommended though.
-
A register window you mean? I think you'll need to script it yourself. Probably won't be extremely hard, but you might have a hard time if you find Lua difficult to use.
-
What exactly are these issues?
-
A compacter way is to use tables/arrays/whatever you call em. (you might want to read the whole post though) z={} z[1] = guiCreateButton ( ... ) z[2] = guiCreateButton ( ... ) z[3] = guiCreateButton ( ... ) ..... etc etc etc... addEventHandler ( "onClientGUIClick", gResRoot, function () if source == z[1] then blahahahahaha if source == z[2] then triggerServerEvent ( "buyZone", gMe ) .........etc etc etc.............. ................................... end ) Even more compact might be... z={} z[1] = {guiCreateButton ( ... ),"aVeryCoolEvent",getLocalPlayer(),"parameters"} z[2] = {guiCreateButton ( ... ),"anotherVeryCoolEvent",getLocalPlayer(),"parameters"} z[3] = {guiCreateButton ( ... ),"yetAnotherVeryCoolEvent",getLocalPlayer(),"parameters"} ..... etc etc etc... And then... addEventHandler ( "onClientGUIClick", gResRoot, function () for k,v in ipairs(z) do if source==v[1] then triggerServerEvent(v[2],v[3],v[4],v[5],v[6]) end end end ) Probably not the easiest way, but atleast it should make it easier. Also note that it's untested and made in crappy XFire in-game webbrowser... My example will only work in the form: z[ index ] = { element guiElement, string event, element theSource, var argument1... } Max number of arguments is 3 in my example.
-
http://development.mtasa.com/index.php? ... ash_screen
-
I already wondered what that for loop was for. addCommandHandler ( "test", function ( ) local objects = getElementsByType ( "object" ) local i=0 for k,object in ipairs (objects) do if getObjectModel (object) == 649 then i=i+1 end end outputChatBox ( "We have "..i.." objects with ID 649" ) end ) This should output the amount of objects with ID 649.
-
Your example doesn't make any sense. It's amountOfObjects=#getElementsByType("object") Kinda bad mistake of mine indeed lol... Anyway, DaK, put "break" (without the quotes) in the line after outputChatBox. Should help.
-
According to the message, GTA SA could not be started. Can you start it in singleplayer? Is it version 1.0? Or does it have a patch on it?
-
#amountOfObjects=getElementsByType("object") The getElementsByType function should return a table. And # counts how many indexes a table has.
-
MTA uses elements. theVehicle=createVehicle(432,0,0,5) -- We create a vehicle, and save it in variable theVehicle outputChatBox(getVehicleName(theVehicle)) -- We'll output the vehicle's name, for pointless reasons However, you can use setElementData on a vehicle to set an "ID" field for instance. Or you can use setElementID, even easier. But I'll try to help you out on this one. You might want to use: - createVehicle (how else do you expect to create it, beside a map) - setElementID, setElementData or anything that might help - onVehicleStartEnter to check for the player's team and compare it with the team required to get onto it. If the team not is the same, then you can do cancelEvent() How to do it: Create a function that creates vehicles for teams. In it, you should do createVehicle, set element data (setElementData) to the team element (made with createTeam I guess?), and then use addEventHandler together with onVehicleStartEnter to check for the team. If you have problems with anything, feel free to ask.
-
/facepalm So for instance, you created image1 like... image=guiCreateStaticImage( 795, 35, 75, 100, "image1.png", false ) Then later on you can do... guiStaticImageLoadImage(image,"image2.png") And it'll change to image2! Hard isn't it..?
-
Might be good to read the tutorial and documentation before trying to swing around with guiStaticImageLoadImage... On resource start, use guiCreateStaticImage to create the image, and then use guiStaticLoadImage to change the pic on weapon switch. EDIT: To 50p: I always thought guiStaticLoadImage could lag a lot when switching weapons quickly for example. That's why I didn't mention it. And I haven't even looked at your GUI Classes that much yet. GUI is already easy enough to me.
-
This bug is indeed on the bug tracker, but marked as resolved. (see Talidan's post) It was me actually who posted this issue (under my community account) and I can remember that this was solved... Haven't tried it in a while though, but I guess everyone should get this if one person gets this. And that last issue is a little weird... Perhaps connected to #3953?
-
It doesn't matter if "most" people run in 1024x768... There are plenty with other resolutions, and you should also care about them. About your real problem, you probably don't even WANT to use bindKey, since there's an awefully easier and more effective way onClientPlayerWeaponSwitch. And one other suggestion: Do guiCreateStaticImage for ALL of the weapon icons you have. Then do guiSetVisible(theImage,false) for the ones you don't need. To check which one you need, it might be useful to use getPlayerWeapon. This should get you a long way in your script. And I indeed didn't even think about HUD positioning that might differ...
-
guiCreateStaticImage( 795, 35, 75, 100, "Main/Chainsaw.png", false ) -- <-------------- That line won't make your script very popular... It will only draw correctly on your current resolution. Someone with a 800x600 or 1280x960 will probably have a way other view than you have right there. In fact, with 800x600 I think it even draws half inside the right border... You should use relative coordinates, instead of absolute ones. That should make it look about the same for everyone.
-
Colorcode in nicks suck... Let him try removing it?
-
Blame CEGUI... But pressing CTRL+A is the only way to fix it. (dunno what you mean with strg?)
-
He didn't say this for nothing you know...
-
Some questions about Multi Theft Auto 1.0.
Gamesnert replied to Madalin2009's topic in General discussion
This is already being made by Gothem, you're a little too late. -
What do you expect from us? To guess your parent's password? -___- If your parents can't help you on this, we especially can't. There's no other way to portforward as far as I know, and we can't help you any further on this.
-
I won't, my quote will. ALSO: Routers have user manuals. If you can't read or understand those, noone can help you. Pfff... You really don't read, now do you... - Questions are asked, you don't answer them, so we can't really help you further - You don't give us any more information, so we can't really help you further - You don't seem to go to the links either, so we can't really help you further Take some time to read, I'm sure the answer has been given about 5 times...