-
Posts
2,973 -
Joined
-
Last visited
-
Days Won
3
Everything posted by 50p
-
Alt+Tab was never enabled not even when you weren't connected. The only thing that allowed you to minimize the game was window mode which is different from Alt+Tab, these are 2 different ways of minimizing. AFAIR, lil_Toady said it will stay like that because people use window mode even if the aren't scripters, minimize it and cause desych.
-
Closed beta? Only trusted and selected people can be beta testers. No it was not enabled. You are not able to Alt+Tab game now and you will not be to do so in the future. As I said, it causes desych which is also a reason why not many people play MTA.
-
Alt-Tab will not work in DP3 and never will. It's because it causes desych which is the main point why it's not possible to just Alt-Tab.
-
I tried that too but it doesn't seem to be like in VS. It's a good feature so if you've registered there (I couldn't be bothered to do it myself ) post a request.
-
Settings -> Style Configurator... -> Lua Then choose whichever style you want the functions to be using (prefer FUNC1) and paste list of functions (not the xml file but function names only; keywords) to the "User Define keywords". Click OK.
-
Try with numbers but: objectid[i][i][i] = createObject(....) I think you won't make it... people will. I won't make it for you because I wanted to do it for you I'd do the entire script. I can't see you in scripting, you are not learning anything... You had problem with "attempt to index '?' (nil value)" but you don't know how you fixed it. And the code you tried with numbers [0][99][99] will not work because [0][99] is not a table when it's executed.
-
Disable this resource for non-admin players.
-
Why do you need to know who created the object anyway?
-
I can't help you much now because my college started giving coursework and it's important for me. Try moving line 16 (fileWrite) to line 17 (after "end").
-
Function must have a name to be called afterwards. You haven't named the function in any ways but if you want to execute that code you simply remove line with "function()" and the last "end" which closes it. Also, from what I can see in that file you would loop 2500 times to create 2500 objects (same object, same position) use break to stop the loop.
-
For as far as I know you can't disable other player's healthbars. You can do it with Nametags! (that's a hint, look for it in the pages Robhol gave ) Of course it is, if we are talking about the bar which is going through the body of the players... In the ChatBox its the command /shownametags. Then all is disabled, i actually dont know the function inside the wiki... But interesting point: Is there a possibility of Executing a Command? (No, i do not mean executeCommandHandler). Would be nice like executeCommand("shownametags",source). This would save veeeery much work, and make the using of TriggerServer/CientEvent unnecessary in many cases. Tell me if this is :~ There is no other function to execute command.
-
Not working, as I explained before, the function of the external resource called in script resource A and the function called in resource B give back different values. Why do I want to do this? Because my last anticheat script failed due to this stupid fact that different resources are not able to exchange data, no matter what. Why do I want to have different resources, instead of one script which contains everything? Because of the advantage that you can change and restart a script without messing with the whole concept. P.S.: Don't tell me the only way to exchange such data is an SQL access. I actually want to prevent any sort of ammo and hp hacks. Doing so via SQL is, in my eyes, a stupid idea. If you don't want to use setElementData then you can use events, like trigger event to "ask" another resource to trigger another event to tell the resource that asked what the value is, but that's non-sense because elements can store data pretty easily, that's what it is for.
-
This is I think the simplest way to show/hide chat with "i" key, here: local isChatVisible = true bindKey( "i", "down", function( ) isChatVisible = not isChatVisible; showChat( isChatVisible ); end )
-
Do you mean realy the map file? (for example mymap.o23) I should write lua code in this file? That's exactly what I was telling you! loadstring() is not MTA's function to load maps. It's a Lua function to execute Lua code, that's why you need to make your "map" (.o23) lua code. Maps in MTA are in XML format, so your map is different and you use MTA's functions in that map (.o23), like createObject.
-
Why would you need to "share" the same variable in 2 seperate resources? Make one resource and deal with with one variable.
-
Alright, here is your new v2.0 that people were waiting for ATM feature included. Read the first post!
-
You didn't understand me correctly... You think you can make a map (or something) and use loadstring() to load that map. Well, you can but you must make that table inside the file (.o23) but you make it inside function saveThisMap() which is pointless if objectid table already exist in that script. You should practice with loadstring() a bit first before you start loading file with it.
-
I've relied to your PM. I don't have any problems with this file, the banks loads correctly and works as it should. New version of bank resource will be released soon with lots of new features which I'm not going to mention here... most of them were given away in bank's topic and such questions should be asked there. I wanted to release it 2 moths ago but college takes my time away.
-
When you use loadstring() it's like executing a script, that is running a lua script. So how do you expect the script to have a table that doesn't exist. Working with multi-dimensional arrays in Lua is much different from C/C++, PHP, etc. because if you want to make an array like, int objectid[ 100 ][ 32 ][ 32 ]; You need to make a loop which makes them: objectid = { } for i=1, 100 do objectid[ i ] = { } -- make a table inside of a table ( objectid[ 100 ][ ] ) for j=1, 32 do objectid[ i ][ j ] = { } -- make another table inside the 2nd dimension ( objectid[ 100 ][ 32 ][ ] ) end end (Similar code must be included in the "map" file (in your case: .o23), which is dealt as a lua script)
-
Look at this: str = "string""..string And ask yourself why "..string" is red? If you don't know why, learn it: http://www.lua.org/pil/2.4.html Also, you don't have to start string with "" at the start and its end, like str = ""..woot.." hmm, what?" You can: str = woot .." hmm, what?" And that means? Sorry ^^ That means, in your map file (.o23) you need to create a table: objectid which is 3D (3 dimensional) because that's how your table looks. Try to create a script like this: objectid[0]["User: XetaQuake"]["Nick: [GP_A]XetaQuake" ] = createObject(2414, 2131.0314941406, 2137.0732421875, 9.671875, 0, 0, 0) And add it to meta.xml. You will get error message saying you try to index '?', why? Because objectid is not created in that script. It seems to be too advanced for you... I'd recommend you try it with OO (object-oriented, http://www.lua.org/pil/16.html ) coding, but it's for more advanced users.
-
You'd have to use: - onClientRender - getCameraPosition - setCameraPosition - setCameraLookAt - and some calculations to make camera look ahead Use wiki for functions reference and some example codes.
-
Yes, the 2nd one would work but objectid must be defined as 3d table. Unfortunately, MTA blocked dofile() function which you could use to execute the code from a file.
-
loadstring() returns a functions and using () you call it to execute the string. You could do something like this: local executeCode = loadstring( "print( 'hello world' )" ) -------- executeCode() -- this will print "hello world"
-
AFAIK this only triggers when the player actually jumps onto an element, not just touching it or colliding with it. That's what he wants... Or maybe he wants an event that is triggered on ever server pulse? There isn't such event and won't be... That's why we have onClientRender. You can add some data to player (setElementData) that says you are touching object, then you can check (getElementData) if he's touching object in both server-side and client-side scripts. But from what I understand he wants to take away players' hp when touch (contact) with object. If you want to make an object be like a "fire ground" that if you walk on it your hp goes down, you should use timers (server-side) or onClientRender (client-side).
-
You are trying to trigger client event but the event is not added. When you try to trigger client event when player joins the server it won't be possible if the client hasn't got the script on his PC. The player must download the script first. Use onClientResourceStart.