-
Posts
1,461 -
Joined
-
Last visited
-
Days Won
34
Everything posted by DiSaMe
-
Probably because you have a syntax error clearly visible in the middle of this script.
-
Nothing is removed. Your script searches for existing clan node and changes its name instead of creating another node.
-
It may be counterintuitive, but not "illogical" - it's explained why it works that way: https://wiki.multitheftauto.com/wiki/EngineImportTXD
-
No, don't do this. Doing this means assuming that the client-side script is guaranteed to start in 100 ms. This assumption is incorrect.
-
Nice. Relativity is a really interesting part of physics. Too bad that time dilation cannot be done with multiple players
-
When resource starts on the server, there's no way for it to have started and added an event on the client. You have to make sure that script is already running on the client when you trigger an event. There are easier ways to pass the element, such as using element ID functions: setElementID getElementByID It's simple, you set the element ID server-side and get the element from ID on the client. Then you can use setPedControlState on it.
-
Export the texture in format which MTA DX functions can use (such as PNG) and then make a shader which applies the image to bandana texture on player models.
-
Does unpackbriefmark return 3 values?
-
You're trying to delete the children of this node: clan="FBI">> Since it contains no children, nothing is deleted. It happens this way because xmlFileLoad returns this node: >...> And then you're getting its first child (FBI clan) as 'clansroot', then looping through its children (which don't exist, therefore nothing is removed). You're supposed to loop through the children of 'clans' instead. In addition, you're saving and unloading the XML file inside the loop - that's wrong. You should do this after the loop. If you unload the file inside the loop, it won't be available for the next iteration, causing an error. Saving the file repeatedly will have no effect on the result, but doing so will needlessly reduce the performance.
-
The root node of XML file is the one which xmlLoadFile returns.
-
Create the ped server-side?
-
Client-side elements do not exist in the server. You can't use the client-side elements as valid element values on the server.
-
Accounts used to be stored in XML files, but now the database is used. They are identified by name. If you want to have the two systems of accounts connected, then you need to use addAccount/removeAccount alongside the query which creates/destroys the account record in your MySQL database, and then you can modify your logPlayer function in such way that the player would be logged into the account of built-in system and also linked to the account of your database in some way. But to me, connecting the systems seems messy. Why would you do that? You could either use one system to store the data or two systems for different purposes. For example, I'm making a gamemode with a custom account system which stores the data of the players (weapons, money, etc.) and I will also be using the built-in account system to log in as admin. The two systems used for different purposes aren't linked to each other in any way (for example, I can log in/out as admin while still using the same game account) and that is much better than having the gameplay achievements tied to the admin or moderator status.
-
They are separate resources. Just unzip them like Freddy said. Then start lavafl_ctrl and it will start lavaflood too. I made them separate because someone may want to do something more than lava simply rising (such as gamemode where you have to escape the flood).
-
function draw3DText() local x, y = getScreenFromWorldPosition(xpos, ypos, zpos) dxDrawText("Text", x, y) end addEventHandler("onClientRender", root, draw3DText) This draws the 3D text at position xpos, ypos, zpos (you have to replace them with actual coordinates).
-
Why don't you just use the account functions then? It doesn't really look well with two systems of accounts mixed that way. There's no such thing as "account element", and all accounts of MTA account system are stored into the built-in database of MTA server.
-
fileOpen fileClose fileRead fileWrite string.byte string.char
-
If cars table is {{411}, {412}}, then v will be {411} and {412} and getVehicleNameFromModel only accepts numbers, not tables.
-
getScreenFromWorldPosition dxDrawText
-
All scripts of the same resource on the same side (server or client) share the same global variables. That means you can call functions or just use variables in the whole resource as long as they are not defined as local. You can also call the exported functions of the resource from another resource. More information call
-
Cycle through all points using for loop, Calculate the distance to every point and get the one which has the shortest distance.
-
'break' keyword escapes the loop at the point it's reached, preventing the code execution from reaching the 'return true' line.
-
Matrix is probably the most intuitive representation of element's position and rotation. matrix[1] (X) vector points to the right from the element. matrix[2] (Y) points to the front. matrix[3] (Z) points up. matrix[4] is the position of the element. The first example in the getElementMatrix page may help you to understand how it works.
