Jump to content

Bence2004

Members
  • Posts

    38
  • Joined

  • Last visited

Details

  • Gang
    Bence
  • Location
    Magyarország
  • Occupation
    Bence
  • Interests
    Bence

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Bence2004's Achievements

Rat

Rat (9/54)

1

Reputation

  1. - t ad vissza mindig megvan köszi! for i in string.gmatch("2020-20-22", "%d+") do table.insert(asd, i) end
  2. Segítség kéne. local datum = "2020-02-10" -- ez kéne így: local datum = {2020, 02, 10} -- output megoldás vagy függvénynév?
  3. https://community.multitheftauto.com/index.php?p=resources&s=details&id=18208 use external links DONE
  4. Show video: Download: https://community.multitheftauto.com/?p=resources&s=details&id=18204
  5. Unatkoztam, és elkezdtem magyarosítani és alakítgatni egy CSRW játékmódot. Hát ez lett belőle: https://www.youtube.com/watch?v=w42MxGoA0us
  6. Sorry, this is a bug, I fixed it! And this is dX. If you found bug, write comment on community or forum page. https://imgur.com/hvtik71
  7. GTA: V Designed Login screen Included with login screen. Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18162
  8. Show video: Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18203
  9. How I use dxCreateShader on weapon? What should be elementTypes? dxCreateShader ( string filepath / string raw_data [, float priority = 0, float maxDistance = 0, bool layered = false, string elementTypes = "world,vehicle,object,other" ] )
  10. Bence2004

    Skinsystem

    I want to create a skin system similar to csgo. Changes the texture of your player's weapon as you log in or touch it etc.Can somebody help me?
  11. local weaponsWithSkin = {} function applyWeaponSkin (itemid) local shaderName = premiumItems[itemid][3] local shaderID = itemid setElementData(localPlayer, "weaponShaderID", shaderID) setElementData(localPlayer, "weaponShaderName", shaderName) setWeaponStickerC(localPlayer, shaderName, shaderID) end addEvent("applySkin", true) addEventHandler("applySkin", root, applyWeaponSkin) addEventHandler("onClientResourceStart", resourceRoot, function() for k, v in ipairs(getElementsByType("player")) do local weaponShaderName = getElementData(v, "weaponShaderName") or 0 local weaponShaderID = getElementData(v, "weaponShaderID") or 0 if (weaponShaderName ~= 0 and weaponShaderID ~= 0) then setWeaponStickerC(v, weaponShaderName, weaponShaderID) end end end) addEventHandler("onClientElementStreamIn", root, function() if getElementType(source) == "player" then local weaponShaderName = getElementData(localPlayer, "weaponShaderName") or 0 local weaponShaderID = getElementData(localPlayer, "weaponShaderID") or 0 if (weaponShaderName ~= 0 and weaponShaderID ~= 0) then setWeaponStickerC(source, isVehicleHavePaintjob) end end end) addEventHandler("onClientElementStreamOut", root, function() if getElementType(source) == "player" then local weaponShaderName = getElementData(localPlayer, "weaponShaderName") or 0 local weaponShaderID = getElementData(localPlayer, "weaponShaderID") or 0 if (weaponShaderName ~= 0 and weaponShaderID ~= 0) then removeWeaponStickerC(source) end end end) addEventHandler("onClientElementDestroy", root, function() if getElementType(source) == "player" then local weaponShaderName = getElementData(localPlayer, "weaponShaderName") or 0 local weaponShaderID = getElementData(localPlayer, "weaponShaderID") or 0 if (weaponShaderName ~= 0 and weaponShaderID ~= 0) then removeWeaponStickerC(source) end end end) function setWeaponStickerC(localPlayer, shaderName, shaderID) if shaderName and shaderID then weaponsWithSkin[localPlayer] = {} weaponsWithSkin[localPlayer][1] = dxCreateShader("shaders/texturechanger.fx", 0, 100, false, "ped") weaponsWithSkin[localPlayer][2] = dxCreateTexture("textures/" .. shaderID .. ".png") if (weaponsWithSkin[localPlayer][1] and weaponsWithSkin[localPlayer][2]) then dxSetShaderValue(weaponsWithSkin[localPlayer][1], "TEXTURE", weaponsWithSkin[localPlayer][2]) engineApplyShaderToWorldTexture(weaponsWithSkin[localPlayer][1], "*" .. shaderName .. "*", localPlayer) else outputDebugString("Fegyverskinek: Hiba történt!", 3) end end end addEvent("setWeaponStickerC",true) addEventHandler("setWeaponStickerC", root, setWeaponStickerC) function removeWeaponStickerC(localPlayer) if localPlayer then if (weaponsWithSkin[localPlayer]) then destroyElement(weaponsWithSkin[localPlayer][1]) destroyElement(weaponsWithSkin[localPlayer][2]) weaponsWithSkin[localPlayer] = nil end end end addEvent("removeWeaponStickerC",true) addEventHandler("removeWeaponStickerC", root, removeWeaponStickerC) Kérlek segítsetek! Teljes bezavarodtam már ebbe a pár sorba. Egy olyan skin rendszernek az alapját akarom megcsinálni, amit lehet egyidejüleg, egyszerre több fegyveren is használni 1 localplayernek. Ezzel a scriptel az a baj, hogyha több fegyverre állítok be skint akkor a szinkronizálást nem tudja végrehajtani csak 1 fegyveren.
×
×
  • Create New...