-
Posts
2,778 -
Joined
-
Last visited
-
Days Won
4
Everything posted by darkdreamingdan
-
It might be wise to paste your code. That said, what you're probably looking for is the guiSetVisible function, or if you want to delete it use destroyElement.
-
Yeah, its an MTA bug (resolved in 1.0). You could try something like getRealTime and get the seconds.
-
Nightly build don't work.
darkdreamingdan replied to Thehookerkiller01's topic in Public beta testing
Ah, thanks, now everything works, but can I also use some functions of the map editor and save them and use them in DP2.X ? Or are there some functions what you can do in the editor (like placing cars with a upgrade or something) and use in DP2.X ? Thx Some aspects of .map has changed since DP2. However, I'd say that most of 1.0 saved maps should work in DP2.x (though obviously the editor itself wont work in dp2) -
No, its not strange. Yours involves much more complicated math. If anyone knew it properly perhaps they'd help.
-
The main issue right now is that peds are unable to use weapons at all. Giving peds weapons has limited use as a result. Its something that we hope to resolve in 1.0.1 latest (may be done for 1.0) as it does cripple ped's functionality somewhat.
-
There have been some restructuring of the scripting system in 1.0. Most of the resources will be compatible with small changes or in some cases no changes at all. A resource such as modshop will most likely work the same - GUI has not really changed in 1.0.
-
attachElementToElement (trig help please)
darkdreamingdan replied to [DKR]silverfang's topic in Scripting
AttachElementToElement's offset arguments are relative. This means if you want to attach an element to an element, imagine that the parent element's rotation is 0. For attaching at x -2 would attach behind the element, no matter what it's current rotation. As far as calculating this for two real world positions - it gets a little more complicated. Trigonometry only allows for taking into account two axes. This is fine if, for example, the Z offset is always 0. If you want to calculate a relative argument on all 3 axes, you'll have to use quatornion math or matrices. -
I think they're actually disabled to prevent a strange crash (I remember reading in the source code). When you change radio, its actually all handled by MTA - it detects your key press, and forcefully sets your radio to the next one. With setControlState its not actually detecting your key press. On the positive side, the fact that radio is entirely handled by MTA means in future we can have setPlayerRadioOverride ( [int radioStation = noOverride] ) or something to that effect. This could even work on foot.
-
A few of them are yet to have some functions upgraded within the package. They should all run without upgrading, however.
-
You can use getPlayerNameTagText and setPlayerNameTagText in order to do this.
-
Just so you know, this will bein 1.0, but it needs a few tweaks in MTA first. I belive someone submitted a patch already that (partially) works. I'll implement this properly at some point.
-
Anyone having a tutorial for the new MTA Map Editor?
darkdreamingdan replied to Madalin2009's topic in DM Client-side
The new map editor doesnt support Race at this time. -
getPlayerTeam only returns the team element. If you want to compare the team name, you need to use getTeamName. So performing a getTeamName check on the player's team should make your if statement work. Also your setPlayerTeam function is flawed. You need to pass the team element. createTeam returns a team element that you can pass into it, however.
-
Desyncing gamespeed isnt a big deal. You can get away with it as long as you dont do it during gameplay. A slow-mo after death shouldnt have any major sync issues. If you look at maps such as as-sharks it uses desynced gamespeed to make some players faster than others and it doesnt have any overly adverse effects.
-
Pff. You guys failed to notice he used the same function name for both events!
-
Report it on mantis and i can add it to the to-do.
-
This was reported once before - but it has also been resolved: http://bugs.mtasa.com/view.php?id=3989 So apparently there's another way to get this bug.
-
You're not the only one to state their annoyance at an object being dropped after placement. Could you please paste it on mantis as clearly its worth adding. What i was thinking of doing is after creation, if you right click it drops it completely, left click drops but selects in keyboard mode.
-
guiSetText is what you can use to update a label.
-
Actually LuaEdit has a syntax checker built in. But i never liked LuaEdit it's not very nice to use. Personally i have a syntax check hook using Notepad++'s run option which launches the interpreter.
-
You don't want to download the Lua interpreter to script. Get Notepad++
-
SA-MP emulator - out now for MTA nightly builds
darkdreamingdan replied to arc_'s question in Client
The votemode is part of votemanager, you can turn this off by stopping the votemanager resource. -
Patching your 1.01 or 2.00 version of gta_sa.exe
darkdreamingdan replied to darkdreamingdan's question in Client
I would suggest keeping a backup of your 2.00 .exe and using it whenever you want to run single player. You can copy it and use it under a different filename (it doesnt have to be gta_sa.exe to run). For example, copy your 2.00 .exe and name it gta_sp.exe and use it like that. -
Textlib is a library i wrote to make creation of dxText much easier, while also allowing it to be flexible. It's what i used for my Dance resource (in the MTA vid) to create the text. It makes stuff like shadowed and stroked text a breeze and generally gets rid of the hassle. It also includes an extension for arc's client_anim library to make text animation easy. * By default, Textlib creates centred aligned text and is positioned like serverside textdisplays for maximum simplicity. * if you need to use wordwrap, you will require the use of boundingBox function. This overrides the "position" setting, and sets a bounding box for the text to be wrapped under. * Wordwrap is enabled by default as long as you add a bounding box. * To remove bounding box, use text:boundingBox(false) and it will restore to default positioning using "position" setting. * Make sure you remove any variables that contain references to destroyed text, i.e. "myText = nil" * Scale,font,postGUI,clip parameters mimic dxDrawText * There is a single bug that i know of. "bottom" aligned text does not support multiple lines - wordwrapped or \n'd. * All functions, besides create and destroy, return the current set values if you pass invalid or no arguments, e.g. x,y = text:position() dxText:create( text, x, y, [relative = true ]) --Create dxText dxText:text( text ) -- Change text dxText:position(x,y, [relative = true]) -- Change position dxText:color(r,g,b,[a]) -- Change color dxText:scale(scale) -- Set text scale dxText:visible(bool) -- Make visible or invisible dxText:destroy() -- Delete the dxtext, stop drawing it dxText:font(font) -- Change the dxtext font dxText:postGUI(bool) -- Change whether the text should be drawn on top of or behind any ingame GUI (rendered by CEGUI) dxText:clip(bool) -- if set to true, the parts of the text that don't fit within the bounding box will be cut off dxText:wordWrap(bool) --if set to true, the text will wrap to a new line whenever it reaches the right side of the bounding box. --Set normal, shadow, or border to your texts dxText:type("normal") --No border/shadow dxText:type("shadow",shadowDist, [r = 0, g = 0, b = 0, a = mainTextAlpha]) -- A shadow of color rgba dxText:type("border", [borderSize = 2, r = 0, g = 0, b = 0, a = mainTextAlpha]) -- A border (aka stroke) of rgba dxText:align(horzA, [vertA = currentVertAlign]) -- "center,left,right","center,top,bottom" dxText:boundingBox(left,top,right,bottom, [relative = true]) dxText:sync([player = getRootElement()]) --SERVERSIDE ONLY! http://dan.bastage.net/mta/textlib.zip
-
Welcome and enjoy your stay. Feel free to post in the scripting forums if you get stuck.