• Content count

  • Joined

  • Last visited

Community Reputation

10 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

551 profile views
  1. [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
  2. 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")
  3. Thank you, that helped a lot!
  4. 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
  5. Looking For MOD

    Wrong section.
  6. Cannot see gui

  7. There you go: https://forum.mtasa.com/forum/149-looking-for-staff/
  8. Wrong section.
  9. Weapon Table

    addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local t = {} for i=0, 12 do local weapon = getPedWeapon(source, i) local ammo = getPedTotalAmmo(source, i) table.insert(t, weapon..", "..ammo) end setAccountData(account, "playerweapons", toJSON(t)) end end ) addEventHandler("onPlayerLogin", root, function() local account = getPlayerAccount(source) local t = fromJSON(getAccountData(account, "playerweapons")) for i=0, 12 do local wp = split(t[i+1][1], ", ") giveWeapon(source, wp[1], wp[2], true) setAccountData(account, "playerweapons", false) end end )
  10. How disable Map when joining [Play]

    You just could have opened admin panel --> resources --> freeroam --> double click to show options and 'showmaponstart' false and 'showmapondeath' false You can also set there; welcome message false, disallowed weapon and vehicle ids, setting time and gravity false, etc..
  11. Weapon Ammo

    addEventHandler("onClientWeaponFire", root, function() local weapon = getPedPedWeapon(getLocalPlayer()) if getWeaponAmmo(weapon) == 1 then cancelEvent() end end)
  12. Cannot see gui

    Sure, Add this to function, which is triggered when gui opens: Renderobjects = true And this to function which triggers when gui closes: Renderobjects = false Now add this on bottom of your script: Object = createObject(--your argument here) local ox, oy, oz = getElementPosition(Object) Summary = 0.4 -- amount, how much your object goes upwards addEventHandler("onClientRender", root, function() if Renderobjects then local scpos = guiScrollBarGetScrollPosition(scroll) setElementPosition(Object, ox, oy, oz+(scpos*Summary*0.01)) end end )
  13. Cannot see gui

    There's many different colshapes. See colShape in wiki. createColSphere or createColTube would be best for replacing marker, personally I like to use createColSphere. colshape createColSphere ( float fX, float fY, float fZ, float fRadius ) So just x, y, z and size. Example, how to use it: local col = createColSphere(-2050.5, 167.39999, 27.9, 1) addEventHandler("onColShapeHit", col, function(hitElement) if getElementType(hitElement) == "player" then outputChatBox(getPlayerName(hitElement) .. " entered colshape.") end end addEventHandler("onColShapeLeave", col, function(hitElement) if getElementType(hitElement) == "player" then outputChatBox(getPlayerName(hitElement) .. " t colshape.") end end
  14. Cannot see gui

    Not really needed if you use addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), GUI)
  15. Data Storage On Client Side

    Or just create client sided table and add it to meta so players can't edit it. It would be also fastest because you don't have to request every single word from server. Just create client table like this: languages = { ["Germany"] = { ["edit1"] = "German version of text"; ["edit2"] = "blablablabla"; }; ["English"] = { ["edit1"] = ["English version of text"; ["edit2"] = "blablablabla"; }; } And just use the data like this: if language == "germany" then guiSetText(text-element, languages["Germany"]["edit1"]) guiSetText(button-element, languages["Germany"]["edit2"]) elseif language == "english" then guiSetText(text-element, languages["English"]["edit1"]) guiSetText(button-element, languages["English"]["edit2"]) end Nice, simple and logical.