• Content count

  • Joined

  • Last visited

Community Reputation

11 Decent

1 Follower

About Miika

  • Rank
    Red-Headed Stepchild


  • Gang
  • Location
  • Occupation
    Owner of the server and scripter
  • Interests
    Lua scripting, MTA

Recent Profile Visitors

665 profile views
  1. Redirect user

    Yup, make sure you add ’resource.(your resource)’ in admin group. redirectPlayer
  2. [HELP] how to do this

  3. [HELP]Random Spawn

    function random() local x, y = math.random(-2000, 2000), math.random(-2000, 2000) local z = getGroundPosition(x, y, 200) createObject(9000, x, y, z) --Replace object id with your own end
  4. Skip duplicated table values

    Hello, I'm using gridlist sections for weapon classes. I have stored my weapon data in table and i have set each weapon it's own class. So my problem is this: It creates section for every weapon, but it should skip if there is already section for class. Here's how it looks now and how it should not look: Code: [Table]: prices = { { name="Shotgun", id=25, ammo=30, price=700, class="Shotguns", type="everyone" }; { name="Sawed-off", id=26, ammo=30, price=650, class="Shotguns", type="everyone" }; { name="Combat Shotgun", id=27, ammo=30, price=800, class="Shotguns", type="everyone" }; { name="Uzi", id=28, ammo=60, price=500, class="Sub-Machine Guns", type="everyone" }; { name="MP5", id=29, ammo=60, price=600, class="Sub-Machine Guns", type="everyone" }; { name="Uzi", id=32, ammo=60, price=500, class="Sub-Machine Guns", type="everyone" }; { name="AK-47", id=30, ammo=60, price=800, class="Assault Rifles", type="everyone" }; { name="M4", id=31, ammo=60, price=1000, class="Assault Rifles", type="everyone" }; { name="Rifle", id=33, ammo=60, price=2000, class="Rifles", type="everyone" }; { name="Sniper", id=34, ammo=60, price=3000, class="Rifles", type="everyone" }; { name="Rocket Launcher", id=35, ammo=20, price=7000, class="Heavy Weapons", type="Vip" }; { name="Heat-Seeking Rocket Launcher", id=36, ammo=20, price=1000, class="Heavy Weapons", type="Vip" }; { name="Minigun", id=38, ammo=2000, price=10000, class="Heavy Weapons", type="Vip" }; } [Client]: function drawWeaponsTable(weapons, isVip, vip_discount) local weapons = fromJSON(weapons) guiGridListClear(gridlist) local t = {} for i=1, #weapons do local value = weapons[i]["class"] if t[value] == nil then table.insert(t, value) local row = guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist, row, 1, value, true, false) end local row = guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist, row, 1, weapons[i]["name"], false, false) end end Hope you understand something
  5. Understanding `Sent-To`

    I've always used getRootElement() when triggering serverside event without problems. Make sure you use 'client' instead of source in serverside function.
  6. SpeedOmeter

    It means you haven’t set a value to currentFuel
  7. [Help]Panel open command

    Add this to your script: if not guiGetVisible(aWarpForm) then guiSetVisible(aWarpForm, true) showCursor(true) else guiSetVisible(aWarpForm, false) showCursor(false) end
  8. Hello! I have small script that replaces texture with image using shader and scrolls it from left to right. But i would like that there would be more images scrolling, example: coca cola ad, mcdonalds ad, etc... Would it be possible? I'm quite bad with shaders.. Shader: // // Example shader - uv_scroll.fx // /////////////////////////////////////////////////////////////////////////////// //Global variables /////////////////////////////////////////////////////////////////////////////// float gTime : TIME; /////////////////////////////////////////////////////////////////////////////// // Functions /////////////////////////////////////////////////////////////////////////////// //------------------------------------------- // Returns UV anim transform //------------------------------------------- float3x3 getTextureTransform () { float posU = -fmod( gTime/8 ,1 ); // Scroll Right float posV = 0; return float3x3( 1, 0, 0, 0, 1, 0, posU, posV, 1 ); } /////////////////////////////////////////////////////////////////////////////// // Techniques /////////////////////////////////////////////////////////////////////////////// texture Tex0; technique simple { pass P0 { Texture[0] = Tex0; // Set the UV thingy TextureTransform[0] = getTextureTransform (); // Enable UV thingy TextureTransformFlags[0] = Count2; } } Client-sided script: shader = dxCreateShader("shader.fx") coce = dxCreateTexture("bobo_3.png") dxSetShaderValue(shader, "Tex0", coce) engineApplyShaderToWorldTexture( shader, "buymorejeans")
  9. Thank you, that helped a lot!
  10. Hello, I faced a problem while creating resource/mission. I needed to use drug factory in doherty, SF, but the factory looks like this: https://i.imgur.com/ZpcJRGA.jpg Is there any map fixes for this or model ID for that 'interior' ? Thanks
  11. Looking For MOD

    Wrong section.
  12. Cannot see gui

  13. There you go: https://forum.mtasa.com/forum/149-looking-for-staff/
  14. Wrong section.