Jump to content

Trust aka Tiffergan

Members
  • Posts

    132
  • Joined

  • Last visited

  • Days Won

    2

Trust aka Tiffergan last won the day on December 17 2022

Trust aka Tiffergan had the most liked content!

Details

  • Gang
    Jinno
  • Location
    M1 CH1
  • Occupation
    jobless
  • Interests
    MTA

Recent Profile Visitors

2,413 profile views

Trust aka Tiffergan's Achievements

Poot-butt

Poot-butt (14/54)

20

Reputation

  1. here is a video on youtube how to make this
  2. first gets the cursor position, the camera matrix, and the vehicle position. Then, it calculates the sticker's X position by subtracting the camera's X translation from the cursor's X position, and adding the vehicle's X position. Similarly, it calculates the sticker's Y position by subtracting the camera's Y translation from the cursor's Y position, and adding the vehicle's Y position. local cursorX, cursorY = getCursorPosition() local cameraMatrix = getCameraMatrix() local vehiclePosition = getElementPosition(vehicle) local stickerX = cursorX * 1024 - cameraMatrix[12] + vehiclePosition[0] local stickerY = cursorY * 1024 - cameraMatrix[13] + vehiclePosition[1] stickers[selectedStickerID][1] = stickerX stickers[selectedStickerID][2] = stickerY
  3. Hello, I have problem using script radargen I got map from my server but the problem is I have a green shaders on my server and for example bonecountry, area51 are green and my map from radargen is original like from gta sa so does someone know how I can get output radar with my shaders?
  4. can you show errors from 'debugscript 3' ?
  5. I followed your guide exactly, but when I try to start the model, I get an error. " Resource is loaded, but has errors (Couldn't find file files/lod_conhoos1.txd for resource files)" How can I fix this?
  6. Create a custom event in your script that will trigger the NPC driving the car. Within this event, you will use the setElementData function to set a custom server-side variable that will keep track of the NPC's driving state. You will then create another custom event that will be triggered regularly (for example, using a timer) to update the NPC's driving state based on the value of the custom server-side variable set in step 2. In this second event, you will use the setPedControlState function to set the NPC's driving state. This way, you will be able to create a server-side setPedControlState that allows an NPC to drive a car in MTA.
  7. To create your own shaders in MTA, you will need to have a good understanding of computer graphics and programming, as well as the DirectX graphics library. A good starting point would be to familiarize yourself with the basics of shaders, such as the different types of shaders (vertex shaders, pixel shaders, etc.), how they work, and the syntax of the DirectX Shader Model language. The following resources may be helpful in learning how to create shaders in MTA: The official MTA wiki (https://wiki.mtasa.com/wiki/Main_Page) has a section on shaders and provides information on how to use shaders in MTA. The official MTA forums (https://forum.mtasa.com/) have a section on scripting, where you can find answers to questions and see examples of shaders created by other users. YouTube tutorials and online courses on computer graphics and DirectX may also be helpful in learning how to create shaders. Keep in mind that creating shaders requires a good understanding of programming and graphics, so it may take some time and effort to become proficient. But with practice and determination, you can create your own custom shaders for use in MTA. Here is an example of a simple pixel shader that applies a grayscale effect to the game world float4 PSMain(float2 texCoord : TEXCOORD) : COLOR { float4 color = tex2D(DiffuseMap, texCoord); float intensity = (color.r + color.g + color.b) / 3.0; color.r = intensity; color.g = intensity; color.b = intensity; return color; } technique Grayscale { pass Pass1 { PixelShader = compile ps_2_0 PSMain(); } } This shader takes the texture coordinate data from the game world and applies a grayscale effect to it. The PSMain function calculates the average intensity of the color data and sets the red, green, and blue channels to that value, creating a grayscale image. The Grayscale technique specifies that this shader should be used as a pixel shader, and the Pass1 pass indicates that there is only one pass required to apply this effect. This is just a simple example to give you an idea of what a shader in MTA might look like. More complex shaders can be created by using additional variables, calculations, and techniques.
  8. You can use the "setWeaponProperty" function to set the recoil values for a specific weapon. For example, you can use the following code to set the recoil for an AK-47: setWeaponProperty("AK-47", "poor", "recoil", 0.5) setWeaponProperty("AK-47", "good", "recoil", 0.3) The first argument is the weapon name, the second argument is the skill level, and the third and fourth arguments are the property and value, respectively. The skill level can be "poor", "std", "pro", or "special", and the property can be one of the available weapon properties, such as "recoil", "spread", "accuracy", etc. The value is a number that represents the intensity of the property. You can adjust the values to create the desired recoil behavior for the weapon. Also You can write custom code that modifies the behavior of the weapon's recoil in real-time, based on various factors such as the player's movement, the weapon's condition, or any other variables you choose to include. For example, you could write a script that makes the recoil stronger when the player is moving and weaker when the player is standing still. The possibilities are endless, and the custom recoil behavior can be tailored to meet your specific needs.
  9. local myButton = createButton(0.5, 0.5, 0.1, 0.1, "Click me!", true) addEventHandler("onClientGUIClick", myButton, function() outputChatBox("Button clicked!") end) In this example, the script creates a GUI button and adds an event handler for the onClientGUIClick event. When the button is clicked, the event handler is triggered, and this refers to the button element that was clicked. The output message will display "Button clicked!" in the chatbox.
  10. It's hard for me to understand what you mean, please describe your error better.
  11. To solve the issue you are facing, you need to debug the problem to determine what is causing the players to get stuck in the ground. Here are some steps that you can follow to debug the issue: Check the logs: Look at the server logs to see if there are any error messages that could be related to the issue. Isolate the problem: Try to isolate the problem by disabling other resources one by one until you find the resource that is causing the issue. Reproduce the issue: Try to reproduce the issue in a test environment to see if you can find any patterns or clues as to what is causing the problem. Check the code: If you have access to the source code, check for any errors or issues in the code that could be causing the problem.
  12. The last three arguments of the attachElementToBone function specify the rotation of the element in relation to the bone it's being attached to. The values are for the X, Y, and Z axes, respectively. To make the wheelbarrow appear normal, you'll need to adjust these values to get the desired orientation. A common approach to determining the correct values for these arguments is to use trial and error. You can make small adjustments to the values until the wheelbarrow appears to be in the desired orientation. Keep in mind that the coordinate system used in 3D graphics can be different from the one you're used to, so it may take some time to get the hang of it.
  13. In MTA, when a script is attached to an object, that object is considered the "source". The "root" element refers to the highest level parent object of the source. For example, if a script is attached to a vehicle, then the source would be the vehicle and the root would be the game world. "This" refers to the object that the script is attached to, which is equivalent to the "source". "SourceResource" refers to the resource that the script is part of. Resources are collections of files and scripts that define a specific aspect of the game, such as a custom game mode or a custom vehicle. "SourceResourceRoot" refers to the root directory of the resource that the script is part of. "Client" refers to the client-side script that is running on a player's computer. This is opposed to a server-side script, which runs on the game server. In the context of AddEventHandler, these elements can be used to specify the object that the event handler is attached to. For example: addEventHandler("onPlayerJoin", root, function() outputChatBox("Welcome to the server!") end) In this example, the event handler is attached to the root element, meaning that it will trigger for every player that joins the server. The function passed to AddEventHandler will be called, displaying a message in the chat for each player that joins.
×
×
  • Create New...