Jump to content

botder

MTA Team
  • Posts

    524
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by botder

  1. Do you have Cheat Engine opened?
  2. How do you want to validate the data? What if a client sents a sync message that he hit every player with a headshot?
  3. botder

    MP3 Panel

    I see. In the pause/stop functions you use the variable row, but it will never have any value inside it. Missing: local row = guiGridListGetSelectedItem(music.Gridlist[1]) Here: function pauseOne() if source == music.Button[2] then if row == 0 then
  4. function createMarker() Change the name from your function because it overwrites the original MTA function.
  5. botder

    MP3 Panel

    if row == 0 then Shouldn't it be row == 1? end) Why is there a ")" at the end?
  6. And with that you mean?... It's awful to expand that code to adjust things or maybe add something?
  7. Your code formatting is terrible and the whole script is almost static.
  8. botder

    Video?

    You can do it with shaders. Load the image and pass it to the shader, which will place the image over the billboard.
  9. botder

    object color

    myShader = dxCreateShader('color.fx', 0, 0, false, 'object') dxSetShaderValue(myShader, 'red', 1.0) dxSetShaderValue(myShader, 'green', 0.0) dxSetShaderValue(myShader, 'blue', 0.0) dxSetShaderValue(myShader, 'alpha', 1.0) objects = getElementsByType('object') for _, object in ipairs(objects) do local model = getElementModel(object) if (model == 1854 or model == 4550 or model == 1853 or model == 1855 or model == 1856) then engineApplyShaderToWorldTexture(myShader, '*', object) end end Hint: put that code into onClientResourceStart because the shader file "color.fx" might not be ready when the script starts (not downloaded yet)
  10. Is there any reason why I can't save data into any element directly (without setData), e.g. player.myvariable = true ?
  11. botder

    object color

    Clientside script: myShader = dxCreateShader('shader.fx', 0, 0, false, 'vehicle') dxSetShaderValue(myShader, 'red', 1.0) dxSetShaderValue(myShader, 'green', 0.0) dxSetShaderValue(myShader, 'blue', 0.0) dxSetShaderValue(myShader, 'alpha', 1.0) vehicles = getElementsByType('vehicle') for _, vehicle in ipairs(vehicles) do if (getElementModel(vehicle) == 411) then engineApplyShaderToWorldTexture(myShader, '*', vehicle) end end File shader.fx float red; float green; float blue; float alpha; technique simple { pass P0 { MaterialAmbient = float4(red, green, blue, alpha); } }
  12. Wasn't meant to be rude there. Anyway, some obvious things may not be noticed.
  13. Basic Lua should be a minimum when you are going to script something.
  14. You have to run your maps e. g. on different dimensions to avoid object collisions. And you should know that the resource mapmanager limits the maximum active map-resource count to 1. You should also know that if you start 2 maps like a regular resource then every player has to download the scripts and objects.
  15. I dont know if I used the OOP as it is right now properly, but the class Connection doesn't seem to work as it should
  16. If you store your data tables in a seperate .lua file and write down the scriptfile in meta.xml then you should be fine. MTA does the "include" job for you.
  17. If you learned maths in school then you can use the percentage and totalSize to calculate the transferred amount.
  18. Check out GetLatentEventStatus and use it clientside.
×
×
  • Create New...