-
Posts
62 -
Joined
-
Last visited
Everything posted by v36u
-
Doesnt work with this, @TheMOG. I dont need vehicles, i need replacement for buildings and objects, and for weapons. As an example, for a single weapon i need 4 different textures. --АК-101 {"WE1.txd","WE1.dff",2246}, {"WE2.txd","WE1.dff",2246}, {"WE3.txd","WE1.dff",2246}, {"WE4.txd","WE1.dff",2246}, --АК-101 suppressed {"WE1.txd","WE2.dff",2247}, {"WE2.txd","WE2.dff",2247}, {"WE3.txd","WE2.dff",2247}, {"WE4.txd","WE2.dff",2247}, {"WE5.txd","WE2.dff",2247}, --АК-101 ghillie camo {"WE1.txd","WE3.dff",2248}, {"WE2.txd","WE3.dff",2248}, {"WE3.txd","WE3.dff",2248}, {"WE4.txd","WE3.dff",2248}, {"WE6.txd","WE3.dff",2248}, --АК-101 ghillie camo suppressed {"WE1.txd","WE4.dff",2249}, {"WE2.txd","WE4.dff",2249}, {"WE3.txd","WE4.dff",2249}, {"WE4.txd","WE4.dff",2249}, {"WE5.txd","WE4.dff",2249}, {"WE6.txd","WE4.dff",2249}, and there are a lot of weapons like this. Any other replacement techniques or ideas to prevent the crash? Please.
-
So, for example one of the 6 scripts was in this format function replaceModel() txd = engineLoadTXD("skin name 1.txd", 100 ) engineImportTXD(txd, 100) dff = engineLoadDFF("skin name 1.dff", 100 ) engineReplaceModel(dff, 100) txd = engineLoadTXD("skin name 2.txd", 101 ) engineImportTXD(txd, 101) dff = engineLoadDFF("skin name 2", 101 ) engineReplaceModel(dff, 101) txd = engineLoadTXD("skin name 3.txd", 102 ) engineImportTXD(txd, 102) dff = engineLoadDFF("skin name 3", 102 ) engineReplaceModel(dff, 102) -- and so on end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) and my tester couldn't even join the server and then i re-made it like this local replace = { {"skin name 1.txd","skin name 1.dff",100}, {"skin name 2.txd","skin name 2.dff",101}, {"skin name 3.txd","skin name 3.dff",102}, -- and so on } addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),function() for _, data in ipairs(replace) do engineImportTXD(engineLoadTXD("skins/"..data[1]),data[3]) engineReplaceModel(engineLoadDFF("skins/"..data[2],0),data[3]) end end) And after that, the tester could join the game but after a few seconds in game his game got crashed. Any other ideas? Also, @TheMOG do i need to do that for every single texture?
-
Oh, i solved it, i was so blind. Thank you guys, much appreciated.
-
Hi guys. Recently i discovered that my server crashes some people, not everyone, but some gets crashed. After some research and tests i found out that is because my models resource and because of that i tried to split it in 6 minor scripts, but the same result. If all 6 resources are stopped everyone can enter, but everything looks awful, and if i turn on one resource they get crashed. I tried to delete the cache and restart the server, same result. What may be the problem? The technique i use to replace the models or what? Here is an example of one of the scripts : local replace = { {"HA1.txd","HA1.dff",2180}, {"HA2.txd","HA2.dff",2181}, {"HA22.txd","HA2.dff",2182}, {"HA23.txd","HA2.dff",2183}, {"HA3.txd","HA3.dff",2184}, {"HA4.txd","HA4.dff",2185}, {"HA5.txd","HA5.dff",2186}, {"HA6.txd","HA6.dff",2187}, {"HA7.txd","HA7.dff",2188}, {"HA8.txd","HA8.dff",2380}, {"HA9.txd","HA9.dff",2190}, {"HA10.txd","HA10.dff",2191}, {"HA11.txd","HA11.dff",2192}, {"HA12.txd","HA12.dff",2193}, {"HA13.txd","HA13.dff",2194}, {"HA14.txd","HA14.dff",2195}, {"HA15.txd","HA15.dff",2381}, {"HA16.txd","HA16.dff",2197}, {"HA17.txd","HA17.dff",2198}, {"HA18.txd","HA18.dff",2199}, {"HA182.txd","HA18.dff",2200} {"HA183.txd","HA18.dff",2201}, {"HA184.txd","HA18.dff",2202}, {"HA184.txd","HA18.dff",2203}, {"HA20.txd","HA20.dff",2204}, {"HA21.txd","HA21.dff",2205}, {"HA24.txd","HA24.dff",2206}, {"HA25.txd","HA25.dff",2207}, {"HA26.txd","HA26.dff",2208}, {"HA27.txd","HA27.dff",2209}, {"HA28.txd","HA28.dff",2210}, {"HA29.txd","HA29.dff",2211}, {"IT1.txd","IT1.dff",2212}, {"IT2.txd","IT2.dff",2213}, {"IT3.txd","IT3.dff",2214}, {"IT4.txd","IT4.dff",2215}, {"IT5.txd","IT5.dff",2219}, {"IT6.txd","IT6.dff",2218}, {"IT7.txd","IT7.dff",2217}, {"IT8.txd","IT8.dff",2220}, {"IT10.txd","IT10.dff",2221}, {"IT9.txd","IT9.dff",2222}, {"IT11.txd","IT11.dff",2223}, {"IT12.txd","IT12.dff",2224}, {"LU1.txd","LU1.dff",2225}, {"LU1.txd","LU2.dff",2226}, {"LU3.txd","LU3.dff",2227}, {"LU4.txd","LU4.dff",2228}, {"LU5.txd","LU5.dff",2229}, {"LU6.txd","LU6.dff",2230}, {"LU7.txd","LU7.dff",2231}, {"LU8.txd","LU8.dff",2232}, {"LU9.txd","LU9.dff",2233}, {"LU10.txd","LU10.dff",2234}, {"LU11.txd","LU11.dff",2235}, {"MON.txd","MON.dff",2245}, {"AM1.txd","AM1.dff",2470}, {"AM1.txd","AM1.dff",2471}, {"WE9.txd","AM3.dff",2472}, {"AM4.txd","AM4.dff",2473}, {"AM5.txd","AM5.dff",2474}, {"AM6.txd","AM6.dff",2475}, {"AM7.txd","AM7.dff",2291}, {"AM8.txd","AM8.dff",2292}, {"AM9.txd","AM9.dff",2293}, {"AM10.txd","AM10.dff",2468}, } addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),function() for _, data in ipairs(replace) do engineImportTXD(engineLoadTXD("skins/"..data[1]),data[3]) engineReplaceModel(engineLoadDFF("skins/"..data[2],0),data[3]) end end) addEventHandler("onClientResourceStart",resourceRoot,function() for _, data in pairs(models) do tex = engineLoadTXD ( ""..data.fileName.. ".txd", data.model ) engineImportTXD ( tex, data.model ) mod = engineLoadDFF ( ""..data.fileName.. ".dff", data.model ) engineReplaceModel ( mod, data.model ) end end)
-
Nice idea but.. didnt work, i even restarted the whole server and.. same error. Any ideas?..
-
Hi guys, i get these errors in the debugscript ERROR : zombies/sounds.lua:67: attempt to call global 'setPedVoice' ( a nil value ) ERROR : zombies/sounds.lua:75: attempt to call global 'isElementStreamedIn' ( a nil value ) And here is the script : function stopZombieSound() local zombies = getElementsByType ( "ped" ) for theKey,theZomb in ipairs(zombies) do setPedVoice(theZomb, "PED_TYPE_DISABLED") -- line 67 end end setTimer(stopZombieSound,1000,0) function playZombieSounds() local zombies = getElementsByType("ped") for theKey,theZomb in ipairs(zombies) do if theZomb and isElement(theZomb) and isElementStreamedIn(theZomb) and getElementData(theZomb,"zombie") and not getElementData(theZomb,"animal") then -- line 75 local Zx,Zy,Zz = getElementPosition(theZomb) zedSound = playSound3D(zombiesounds[math.random(1,#zombiesounds)], Zx, Zy, Zz, false) setSoundMaxDistance(zedSound,5) end if getElementData(theZomb,"deadman") then if zedSound then stopSound(zedSound) end end end end setTimer(playZombieSounds,6000,0) And if i do this local setPedVoice(theZomb, "PED_TYPE_DISABLED") i get this error in the console ERROR: Loading script failed: UNION_DAYZ/sounds/sounds.lua:67: ')' expected near ',' Some help please? Thanks in advance.
-
Hello guys, i have a problem with the GPS which is integrated in the DayZ script. Here are the error in the debugscript : WARNING: DayZ\survivorSystem_client.lua:1664: Bad argument @ 'dxDrawImage'[Expected material at argument 5, got boolean] WARNING: DayZ\survivorSystem_client.lua:1666 Bad argument @ 'dxDrawImageSection'[Expected mat material at argument 9] And here is the script My problem : Yes, i tried to make a script only for the GPS, but it has the same results. And i know it can be solved by simply restarting the server but isnt there another way around? Because, if i restart it twice it reappears like this, so i have to restart it three times..
-
Yes, i know it is a scripting section, and i know how to script but i can't understand how that would help in anyway, i thought it would exist some function to expand that limit..
-
Hmm i've tried a lot of things and nothing seemed to work i don't really know how to expand the range of the map in which peds can deal or recieve damage from melee attacks, for example, instead of 3000 something like 20000
-
Ok, so i've been looking at this resource for a while, but what should i do exactly ? i mean, what should i overwrite?
-
Hi guys, its me again, so.. i own this DayZ server and i have an extension for the map, like, where San Fierro finishes it begins another map. And, the San Fierro beach stops after x = -3000 and beyond that point zombies cant hit you, and no one can hit nobody with any type of melee or with the fists, so zombies are pretty much useless. Is there any fix for this thing? Thanks in advance.
-
Hello guys. I own a DayZ server and i have a backup system for tents and vehicles and it is only manual and i want it fully automatic like, every 10 minutes. By the way, big shoutout to the creator of the script, great guy. Here are the scripts : needToSave = { {"MAX_Slots"}, {"Tire_inVehicle"}, {"Engine_inVehicle"}, {"Parts_inVehicle"}, {"Tire_inVehicle_HP"}, {"Engine_inVehicle_HP"}, {"Parts_inVehicle_HP"}, {"armorPointsMax"}, {"armorPoints"}, {"fuel"}, {"maxfuel"}, {"needengine"}, {"needtires"}, {"needparts"}, } function SaveVehicles(player) if isElement(player) then if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))then return end end fileDelete("XVehicles.xml") xml = xmlCreateFile("XVehicles.xml","config") xmlSaveFile(xml) count = 0 for _,vehCol in pairs(getElementsByType("colshape")) do if getElementData(vehCol,"vehicle") and not getElementData(vehCol,"tent") then count = count + 1 if getElementData(vehCol,"parent") and isElement(getElementData(vehCol,"parent")) then veh = getElementData(vehCol,"parent") slots = getElementData(vehCol,"MAX_Slots") health = getElementHealth(veh) x,y,z = getElementPosition(veh) rx,ry,rz = getElementRotation(veh) VehInfos = xmlCreateChild(xml,"Veh") xmlNodeSetAttribute(VehInfos,"Name",getVehicleName(veh)) xmlNodeSetAttribute(VehInfos,"ID",getElementModel(veh)) xmlNodeSetAttribute(VehInfos,"Health",math.floor(health)) xmlNodeSetAttribute(VehInfos,"X",x) xmlNodeSetAttribute(VehInfos,"Y",y) xmlNodeSetAttribute(VehInfos,"Z",z) xmlNodeSetAttribute(VehInfos,"RX",rx) xmlNodeSetAttribute(VehInfos,"RY",ry) xmlNodeSetAttribute(VehInfos,"RZ",rz) VehItens = xmlCreateChild(VehInfos,"Itens") for _,item in pairs(needToSave)do if(tonumber(getElementData(vehCol,item[1])) and getElementData(vehCol,item[1]) >= 1) then Item2 = xmlCreateChild(VehItens,"Item") xmlNodeSetAttribute(Item2,"Item",item[1]) xmlNodeSetAttribute(Item2,"Quant",getElementData(vehCol,item[1]) or 0) end end for _,item in pairs(needToSave)do Item2 = xmlCreateChild(VehItens,"Item") xmlNodeSetAttribute(Item2,"Item",item[1]) xmlNodeSetAttribute(Item2,"Quant",getElementData(vehCol,item[1]) or 0) end end end end xmlSaveFile(xml) xmlUnloadFile(xml) if isElement(player) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))then outputChatBox("Vehicles Saved ["..count.."] #000000- By Victormgons",player,255,0,0,true) end end end addEventHandler("onResourceStop",getResourceRootElement(),SaveVehicles) setTimer(SaveVehicles,600000,0) function LoadVehicles(player) if isElement(player) then if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))then return end end xml = xmlLoadFile("XVehicles.xml") for i,node in pairs(xmlNodeGetChildren(xml)) do x = tonumber(xmlNodeGetAttribute(node,"X")) y = tonumber(xmlNodeGetAttribute(node,"Y")) z = tonumber(xmlNodeGetAttribute(node,"Z")) rx = tonumber(xmlNodeGetAttribute(node,"RX")) ry = tonumber(xmlNodeGetAttribute(node,"RY")) rz = tonumber(xmlNodeGetAttribute(node,"RZ")) veh = createVehicle(tonumber(xmlNodeGetAttribute(node,"ID")),x,y,z,rx,ry,rz) vehCol = createColSphere(x,y,z,4) setElementData(vehCol,"spawn",{tonumber(xmlNodeGetAttribute(node,"ID")),x,y,z}) attachElements(vehCol,veh,0,0,0) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementHealth(veh,tonumber(math.floor(xmlNodeGetAttribute(node,"Health")))) for i,Item in pairs(xmlNodeGetChildren(xmlFindChild(node,"Itens",0))) do setElementData(vehCol,xmlNodeGetAttribute(Item,"Item"),tonumber(xmlNodeGetAttribute(Item,"Quant"))) end end xmlUnloadFile(xml) if isElement(player) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))then outputChatBox("All Vehicles has been loaded! #000000- By Victormgons",player,255,0,0,true) end end end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),LoadVehicles) addCommandHandler("savevehs",SaveVehicles) addCommandHandler("loadvehs",LoadVehicles) function SaveTents(player) if isElement(player) then if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))then return end end fileDelete("XTents.xml") xml = xmlCreateFile("XTents.xml","config") xmlSaveFile(xml) count = 0 for _,tentCol in pairs(getElementsByType("colshape")) do if getElementData(tentCol,"tent") then count = count + 1 Tent = getElementData(tentCol,"parent") x,y,z = getElementPosition(Tent) rx,ry,rz = getElementRotation(Tent) TentInfos = xmlCreateChild(xml,"Tent") xmlNodeSetAttribute(TentInfos,"ID",getElementModel(Tent)) xmlNodeSetAttribute(TentInfos,"Scale",getObjectScale(Tent)) xmlNodeSetAttribute(TentInfos,"Slots",getElementData(tentCol,"MAX_Slots")) xmlNodeSetAttribute(TentInfos,"X",x) xmlNodeSetAttribute(TentInfos,"Y",y) xmlNodeSetAttribute(TentInfos,"Z",z) xmlNodeSetAttribute(TentInfos,"RX",rx) xmlNodeSetAttribute(TentInfos,"RY",ry) xmlNodeSetAttribute(TentInfos,"RZ",rz) xmlNodeSetAttribute(TentInfos,"Visible",tostring(getElementData(tentCol,"visible") or false)) TentItens = xmlCreateChild(TentInfos,"Itens") for _,item in pairs(needToSave) do if getElementData(tentCol,item[1]) and getElementData(tentCol,item[1]) >= 1 then Item2 = xmlCreateChild(TentItens,"Item") xmlNodeSetAttribute(Item2,"Item",item[1]) xmlNodeSetAttribute(Item2,"Quant",getElementData(tentCol,item[1])) end end end end xmlSaveFile(xml) xmlUnloadFile(xml) if isElement(player) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))then outputChatBox("Tents Saved ["..count.."] #000000- By Victormgons",player,255,0,0,true) end end end addEventHandler("onResourceStop",getResourceRootElement(),SaveTents) setTimer(SaveTents,600000,0) function LoadTents(player) if isElement(player) then if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))then return end end xml = xmlLoadFile("XTents.xml") for i,node in pairs(xmlNodeGetChildren(xml)) do ID = tonumber(xmlNodeGetAttribute(node,"ID")) Scale = tonumber(xmlNodeGetAttribute(node,"Scale")) Slots = tonumber(xmlNodeGetAttribute(node,"Slots")) x = tonumber(xmlNodeGetAttribute(node,"X")) y = tonumber(xmlNodeGetAttribute(node,"Y")) z = tonumber(xmlNodeGetAttribute(node,"Z")) rx = tonumber(xmlNodeGetAttribute(node,"RX")) ry = tonumber(xmlNodeGetAttribute(node,"RY")) rz = tonumber(xmlNodeGetAttribute(node,"RZ")) visible = xmlNodeGetAttribute(node,"Visible") tent = createObject(ID,x,y,z,rx,ry,rz) setObjectScale(tent,Scale) tentCol = createColSphere(x,y,z,4) attachElements(tentCol,tent,0,0,0) setElementData(tentCol,"parent",tent) setElementData(tent,"parent",tentCol) setElementData(tentCol,"tent",true) setElementData(tentCol,"vehicle",true) if visible == "true" then vis = true else vis = false end setElementData(tentCol,"visible",vis) setElementData(tentCol,"MAX_Slots",Slots) for i,Item in pairs(xmlNodeGetChildren(xmlFindChild(node,"Itens",0))) do setElementData(tentCol,xmlNodeGetAttribute(Item,"Item"),tonumber(xmlNodeGetAttribute(Item,"Quant"))) end end xmlUnloadFile(xml) if isElement(player) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))then outputChatBox("All tents has been saved! #000000- By Victormgons",player,255,0,0,true) end end end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),LoadTents) addCommandHandler("savetents",SaveTents) addCommandHandler("loadtents",LoadTents) Thanks in advance.
- 1 reply
-
- 1
-
-
Salut ! Am venit să vă prezint serverul DayZLife România! Tocmai am rezolvat un bug care făcea serverul instabil, iar acum este playable. În caz că aveți orice fel de problemă contactați membrii staff-ului. Ce vă așteaptă pe server? : -> Toate traducerile în limba română. -> GameMode unic în Romania. -> Două tipuri de inventare. -> Caracter complet costumizabil cu mii de opțiuni de haine, sunt foarte multe sortimente de căciuli, căști, măști, berete, șepci, veste, ghiozdane, costume și lista continuă. -> Minigun montabil pe mașini/elicoptere. -> Foarte multe vehicule (Peste 250) , incluzând 3 tancuri (cu opțiunea de a fi încărcate cu seturi de câte 6 rachete) -> Multe tipuri de arme cu atașamente de genul Ghillie Camo/Supressor. -> Mapă prelungită din San Fierro ( Orașul Pripyat, Chernobyl 1986 ) -> Mape alternative subterane ( Metrourile ) -> Staff prietenos și experimentat. -> Baze create să arate cât mai natural, nu 4 pereți și un acoperis. ( De asemenea bazele nu au protecție dar sunt făcute tactice, pentru a spori pvp-ul ). -> Animale care pot fi vânate. -> Shop făcut să pară cât mai real. -> Posibilitatea de a tăia copaci. -> Posibilitatea de crafta cu ajutorul BluePrint-urilor. -> Foarte multe zone militare și de pvp. -> Sistem avansat de A.I. ( Zombie pe mai multe clase, unii mai periculoși ca alții, și chiar și bossi ) -> Tunele și foarte multe locații ascunse pentru a vă seta baze improvizate. -> Posibilitatea de a vă alege locul de spawn. -> Sistem de corturi avansat pentru a vă putea să vă faceți baze improvizate. -> Fără nici un fel de lag. -> Vreme ( Noapte / zi, senin sau cu ceață ) -> Clanuri officiale pentru care puteți aplica pe forum, și se vor organiza competiții. -> Și multe altele, dar restul vă las să descoperiți singuri. Vă las niște poze aici . Dezavantaje? Dacă considerați faptul că trebuie să descărcați un GB și ceva, atunci gândiți-vă că se merită, foarte mulți jucători au fost de aceeași părere dar s-au răzgândit. Vă așteptăm cu drag . Nickname ingame: ~>Bill!^ Comuniate : www.csarena.net IP : mtasa://151.80.6.100:22003
-
Hi guys, i get two errors on my gps resource ( that is included in the dayz gamemode ) and it looks like this. ( ignore the worldChange error ) And here is the script : local wx, hy = guiGetScreenSize() local gpsX = 203 local gpsY = 188 local mapSizeX = 170 local mapSizeY = 121 local mapX = -6.00 local mapY = hy-gpsY- -1 local playerX = mapX+104 local playerY = mapY-20.5 local playerSizeX = 25 local playerSizeY = 25 --Binoclu local textures = {}; local function render_crosshair () local screenw, screenh = guiGetScreenSize (); local s = screenw * 0.5; local u,v = (screenw - s)*0.2, (screenh - s)*0.2; local black = tocolor (0, 0, 0, 255); dxDrawRectangle (0, 0, screenw, v, black); dxDrawRectangle (0, 0, u, screenh, black); dxDrawRectangle (0, screenh, screenw, -v, black); dxDrawRectangle (screenw, screenh, -u, -screenh, black); dxDrawImage (u, v, screenw-2*u, screenh-2*v, textures ["crosshair"]); end; local function on_weapon_aimed (key, state) local weapon_binocular = 43; if getPedWeapon (getLocalPlayer ()) == weapon_binocular then if state == "down" then setPlayerHudComponentVisible ("crosshair", false) addEventHandler ("onClientHUDRender", getRootElement (), render_crosshair); toggleControl ("fire", false) showChat(false) else removeEventHandler ("onClientHUDRender", getRootElement (), render_crosshair); showChat(true) toggleControl ("fire", true) end; end; end; addEventHandler ("onClientResourceStart", getResourceRootElement (getThisResource ()), function () textures ["crosshair"] = dxCreateTexture ("images/binoculars.png", "argb", true, "wrap"); if not textures ["crosshair"] then return; end; bindKey ("aim_weapon", "both", on_weapon_aimed); addEventHandler ("onClientPlayerWeaponSwitch", getRootElement (), function (previousWeaponSlot) local weaponslot_type_binocular = 9; if previousWeaponSlot == weaponslot_type_binocular then if not isPlayerHudComponentVisible ("crosshair") then setPlayerHudComponentVisible ("crosshair", true); showChat(true) toggleControl ("fire", true) end; end; end); addEventHandler ("onClientResourceStop", getResourceRootElement (getThisResource ()), function () unbindKey ("aim_weapon", "both", on_weapon_aimed); showChat(true) toggleControl ("fire", true) if not isPlayerHudComponentVisible ("crosshair") then setPlayerHudComponentVisible ("crosshair", true); end; end); end); ---- function rangeFinder() local w, h = guiGetScreenSize () local tx, ty, tz = getWorldFromScreenPosition ( w/2, h/2, 500 ) local px, py, pz = getPedBonePosition(localPlayer,8) hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, tx, ty, tz ) if getPedWeapon(localPlayer) == 43 and getElementData(localPlayer,"currentweapon_3") == "Binoclu" then if getControlState("aim_weapon") then if x and y and z then local distance = getDistanceBetweenPoints3D(px,py,pz,x,y,z) dxDrawText(tostring(math.floor(distance)).."m",w/2-49,h/2,w,h,tocolor(0,0,0,220),1,"sans") dxDrawText(tostring(math.floor(distance)).."m",w/2-50,h/2,w,h,tocolor(255,255,255,220),1,"sans") else local distance = 500 dxDrawText("+"..tostring(math.floor(distance)).."m",w/2-49,h/2,w,h,tocolor(0,0,0,220),1,"sans") dxDrawText("+"..tostring(math.floor(distance)).."m",w/2-50,h/2,w,h,tocolor(255,255,255,220),1,"sans") end end end end addEventHandler("onClientRender",root,rangeFinder) addEventHandler("onClientResourceStart", getResourceRootElement(),function() setPlayerHudComponentVisible ("radar",false) xsize = mapSizeX+180 rr = dxCreateRenderTarget(xsize,xsize,true) rr2 = dxCreateRenderTarget(xsize,xsize,true) centerleft = xsize / 2 centertop = mapSizeY / 2 blipsize = 16 end) playerTexture = dxCreateTexture ("images/GPS/player.png","argb",true,"clamp") mapTexture = dxCreateTexture ("images/GPS/radar.jpg","argb",true,"clamp") gpsTexture = dxCreateTexture ("images/GPS/gps.png","argb",true,"clamp") addEventHandler("onClientResourceStart", getResourceRootElement(), function() versionLabel = guiCreateLabel(1,1,0.3,0.3,"DayZ Life Reborn",true) guiSetSize(versionLabel, guiLabelGetTextExtent ( versionLabel ), guiLabelGetFontHeight ( versionLabel ), false ) x,y = guiGetSize(versionLabel,true) guiSetPosition( versionLabel, 1-x, 1-y*1.8, true ) guiSetAlpha(versionLabel,0.5) versionLabel2 = guiCreateLabel(1,1,0.3,0.3,"".. string.sub(getPlayerSerial(getLocalPlayer()), 27) .."",true) guiSetSize(versionLabel2, guiLabelGetTextExtent ( versionLabel2 ), guiLabelGetFontHeight ( versionLabel2 ), false ) x,y = guiGetSize(versionLabel2,true) guiSetPosition(versionLabel2, 1-x, 1-y*2.6, true ) guiSetAlpha(versionLabel2,0.5) end) setPedTargetingMarkerEnabled(false) function playerStatsClientSite() if getElementData(getLocalPlayer(),"logedin") then toggleControl ("radar",false) setPlayerHudComponentVisible("clock",false) setPlayerHudComponentVisible("radar",false) setPlayerHudComponentVisible("money",false) setPlayerHudComponentVisible("health",false) setPlayerHudComponentVisible("weapon",false) setPlayerHudComponentVisible("ammo",false) setPlayerHudComponentVisible("breath",false) setPlayerHudComponentVisible("area_name",false) setPlayerHudComponentVisible("vehicle_name",false) --if getElementData(getLocalPlayer(),"Hartă") >= 1 then --toggleControl ("radar",true) --end end end setTimer(playerStatsClientSite,1000,0) --Foloseșteравление стелс убийства ножом (в survivalSystem_client) function killKnifeStelth(targetPlayer) if isElement(targetPlayer) and isElement(source) then if not getElementData(targetPlayer,"bandit") then setElementData(source,"murders",getElementData(source,"murders") + 1) else setElementData(source,"banditskilled",getElementData(source,"banditskilled") + 1) end setElementData(targetPlayer,"blood",-3) end end addEventHandler("onClientPlayerStealthKill",getRootElement(),killKnifeStelth) nightvisionimage = guiCreateStaticImage(0,0,1,1,"images/nightvision.png",true) guiSetVisible(nightvisionimage,false) infravision = guiCreateStaticImage(0,0,1,1,"images/infravision.png",true) guiSetVisible(infravision,false) function playerZoom (key,keyState) if key == "n" then if getElementData(getLocalPlayer(),"Ochelari cu viziune nocturnă") >= 1 then if nightvision then guiSetVisible(nightvisionimage,false) guiSetVisible(infravision,false) nightvision = false setCameraGoggleEffect("normal") else nightvision = true guiSetVisible(nightvisionimage,true) guiSetVisible(infravision,false) setCameraGoggleEffect("nightvision") end end elseif key == "i" then if getElementData(getLocalPlayer(),"Ochelari cu infraroșu") >= 1 then if infaredvision then infaredvision = false guiSetVisible(infravision,false) guiSetVisible(nightvisionimage,false) setCameraGoggleEffect("normal") else infaredvision = true guiSetVisible(infravision,true) guiSetVisible(nightvisionimage,false) setCameraGoggleEffect("thermalvision") end end end end bindKey("n","down",playerZoom) bindKey("i","up",playerZoom) function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end function getWeaponAmmoType (weaponName) for i,weaponData in ipairs(weaponAmmoTable["others"]) do if weaponName == weaponData[1] then return weaponData[1],weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["STANAG"]) do if weaponName == weaponData[1] then return "STANAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["AK-MAG"]) do if weaponName == weaponData[1] then return "AK-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["AK-DRUM"]) do if weaponName == weaponData[1] then return "AK-DRUM",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["SVD-MAG"]) do if weaponName == weaponData[1] then return "SVD-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["VSS-MAG"]) do if weaponName == weaponData[1] then return "VSS-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["MOSIN-CLIP"]) do if weaponName == weaponData[1] then return "MOSIN-CLIP",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["SKS-CLIP"]) do if weaponName == weaponData[1] then return "SKS-CLIP",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["FAL-MAG"]) do if weaponName == weaponData[1] then return "FAL-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["Gauge Buckshot"]) do if weaponName == weaponData[1] then return "Gauge Buckshot",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["MP5-K-MAG"]) do if weaponName == weaponData[1] then return "MP5-K-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["CZ61-MAG"]) do if weaponName == weaponData[1] then return "CZ61-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["UMP45-MAG"]) do if weaponName == weaponData[1] then return "UMP45-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["1911-MAG"]) do if weaponName == weaponData[1] then return "1911-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["GLOCK-MAG"]) do if weaponName == weaponData[1] then return "GLOCK-MAG",weaponData[2] end end for i,weaponData in ipairs(weaponAmmoTable["MAGNUM-MAG"]) do if weaponName == weaponData[1] then return "MAGNUM-MAG",weaponData[2] end end end function getWeaponDamage (weapon) for i,weapon2 in ipairs(damageTable) do local t,weapon1 = getWeaponAmmoType(weapon2[1]) if weapon1 == weapon then if getElementData(getLocalPlayer(),"humanity") == 5000 then if weapon2[1] == "1911" or weapon2[1] == "1911 cu supressor" or weapon2[1] == "GLOCK 19" or weapon2[1] == "GLOCK 19 cu supressor" or weapon2[1] == "MAGNUM" then return weapon2[2]*0.3 end end return weapon2[2] end end end clothBody = { {"Vestă cu mici depozite",0.55}, {"Vestă anti-șoc",0.65}, {"Vestă PRESS",0.65}, {"Vestă PRESS Albastră",0.75}, {"Vestă PRESS Camo",0.75}, {"Vestă PRESS Camo №2",0.75}, } clothHead = { {"Cască Militară Verde",0.55}, {"Cască Militară Neagră",0.55}, {"Cască Militară Albastră",0.55}, {"Cască Militară Camuflată №1",0.55}, {"Cască Militară Camuflată №2",0.55}, {"Cască Militară Camuflată №3",0.55}, {"Cască E ( Verde )",0.55}, {"Cască E ( Neagră )",0.55}, {"Cască E ( SWAT )",0.55}, {"Cască E ( Camo )",0.55}, {"Cască Neagră de Muncitor",0.65}, {"Cască Albastră de Muncitor",0.65}, {"Cască Verde de Muncitor №1",0.65}, {"Cască Verde de Muncitor №2",0.65}, {"Cască Portocalie de Muncitor",0.65}, {"Cască Roșie de Muncitor",0.65}, {"Cască Albă de Muncitor",0.65}, {"Cască Galbenă de Muncitor",0.65}, {"Cască Neagră de Pompier",0.55}, {"Cască Roșie de Pompier",0.55}, {"Cască Albă de Pompier",0.55}, {"Cască Galbenă de Pompier",0.55}, {"Cască Neagră de Pilot",0.65}, {"Cască Albă de Pilot",0.65}, {"Cască Verde de Pilot",0.65}, } function playerGetDamageDayZ ( attacker, weapon, bodypart, loss ) cancelEvent() damage = 100 headshot = false if weapon == 37 then return end --Урон Зомби if attacker and getElementData(attacker,"zombie") then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-1221) local number = math.random(1,7) if number == 4 then setElementData(getLocalPlayer(),"bleeding",getElementData(getLocalPlayer(),"bleeding") + math.floor(loss*10)) end if getElementData(getLocalPlayer(), "infection_zom") == 0 then local aleatory = math.random(1,5) if aleatory == 3 then setElementData(getLocalPlayer(), "infection_zom", 1) end end if getElementData(getLocalPlayer(), "infection_zom") == 1 then local aleatory = math.random(1,7) if aleatory == 3 then setElementData(getLocalPlayer(), "infection_zom", 2) end end if getElementData(getLocalPlayer(), "infection_zom") == 2 then local aleatory = math.random(1,8) if aleatory == 3 then setElementData(getLocalPlayer(), "infection_zom", 3) end end end --Урон ведмедя if attacker and getElementData(attacker,"bear") then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-3121) local number = math.random(1,2) if number == 2 then setElementData(getLocalPlayer(),"bleeding",getElementData(getLocalPlayer(),"bleeding") + math.floor(loss*10)) end end --Урон вовк if attacker and getElementData(attacker,"wolf") then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-1981) local number = math.random(1,4) if number == 2 then setElementData(getLocalPlayer(),"bleeding",getElementData(getLocalPlayer(),"bleeding") + math.floor(loss*10)) end end --Урон лисиця if attacker and getElementData(attacker,"fox") then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-1421) local number = math.random(1,5) if number == 2 then setElementData(getLocalPlayer(),"bleeding",getElementData(getLocalPlayer(),"bleeding") + math.floor(loss*10)) end end --Кровосос if attacker and getElementData(attacker,"boss_blood") then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-5612) local number = math.random(1,2) if number == 2 then setElementData(getLocalPlayer(),"bleeding",getElementData(getLocalPlayer(),"bleeding") + math.floor(loss*10)) end end --Всі боси if attacker and getElementData(attacker,"boss_all") then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-4241) local number = math.random(1,5) if number == 2 then setElementData(getLocalPlayer(),"bleeding",getElementData(getLocalPlayer(),"bleeding") + math.floor(loss*10)) end end --Всі боси if attacker and getElementData(attacker,"bot") then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-5000) local number = math.random(1,5) if number == 2 then setElementData(getLocalPlayer(),"bleeding",getElementData(getLocalPlayer(),"bleeding") + math.floor(loss*10)) end end --Mină if not attacker and weapon == 16 then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-28104) return true end if weapon == 49 then if loss > 30 then setElementData(getLocalPlayer(),"brokenbone",true) setControlState ("jump",true) setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.floor(loss*10)) end setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.floor(loss*5)) elseif weapon == 63 or weapon == 51 or weapon == 19 then setElementData(getLocalPlayer(),"blood",0) if getElementData(getLocalPlayer(),"blood") <= 0 then if not getElementData(getLocalPlayer(),"isDead") == true then triggerServerEvent("kilLDayZPlayer",getLocalPlayer(),attacker,headshot) end end elseif weapon and weapon > 1 and attacker and getElementType(attacker) == "player" and weapon ~= 17 then local number = math.random(1,8) if number >= 6 or number <= 8 then setElementData(getLocalPlayer(),"bleeding",getElementData(getLocalPlayer(),"bleeding") + math.floor(loss*10)) end local number = math.random(1,7) if number == 2 then setElementData(getLocalPlayer(),"pain",true) end damage = getWeaponDamage (weapon) if bodypart == 3 then for _, add in ipairs(clothBody) do if getElementData ( getLocalPlayer(), "clothBody" ) == add[1] then damage = damage*add[2] end end end --[[if bodypart == 9 then damage = damage*1.5 headshot = true end ]] if bodypart == 9 then for _, add in ipairs(clothHead) do if getElementData ( getLocalPlayer(), "clothHead" ) == add[1] then damage = damage*add[2] end end end if bodypart == 7 or bodypart == 8 then setElementData(getLocalPlayer(),"brokenbone",true) end setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.random(damage*0.75,damage*1.25)) if not getElementData(getLocalPlayer(),"bandit") then setElementData(attacker,"humanity",getElementData(attacker,"humanity")-math.random(40,200)) if getElementData(attacker,"humanity") < 0 then setElementData(attacker,"bandit",true) end else setElementData(attacker,"humanity",getElementData(attacker,"humanity")+math.random(40,200)) if getElementData(attacker,"humanity") > 5000 then setElementData(attacker,"humanity",5000) end if getElementData(attacker,"humanity") > 2000 then setElementData(attacker,"bandit",false) end end if getElementData(getLocalPlayer(),"blood") <= 0 then if not getElementData(getLocalPlayer(),"isDead") then triggerServerEvent("kilLDayZPlayer",getLocalPlayer(),attacker,headshot,getWeaponNameFromID (weapon)) setElementData(getLocalPlayer(),"isDead",true) end end elseif weapon == 54 or weapon == 63 or weapon == 49 or weapon == 51 then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.random(100,1000)) local number = math.random(1,5) if loss > 30 then setElementData(getLocalPlayer(),"brokenbone",true) setControlState ("jump",true) end if loss >= 100 then setElementData(getLocalPlayer(),"blood",49) setElementData(getLocalPlayer(),"bleeding",50) end local number = math.random(1,11) if number == 3 then setElementData(getLocalPlayer(),"pain",true) end -- Урон от кулаков if weapon == 0 and getElementType(attacker) == "player" then damage = 400 setElementData(localPlayer,"blood",getElementData(localPlayer,"blood")-damage) end --[[Урон от транспорт if getElementType(attacker) == "vehicle" then local attack = getVehicleOccupant(attacker) if attack ~= localPlayer then damage = 24000 setElementData(localPlayer,"blood",getElementData(localPlayer,"blood")-damage) end end]] if getElementData(getLocalPlayer(),"blood") <= 0 then if not getElementData(getLocalPlayer(),"isDead") == true then triggerServerEvent("kilLDayZPlayer",getLocalPlayer(),attacker,headshot,getWeaponNameFromID (weapon)) setElementData(getLocalPlayer(),"isDead",true) end end end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer (), playerGetDamageDayZ ) function pedGetDamageDayZ ( attacker, weapon, bodypart, loss ) cancelEvent() if attacker and getElementType(attacker) == "vehicle" then speedx, speedy, speedz = getElementVelocity ( attacker ) actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) kmh = actualspeed * 180 if kmh >= 20 then local vehkiller = getVehicleOccupant ( attacker ) setElementData(source,"blood",0) if getElementData(source,"blood") <= 0 then triggerServerEvent("onZombieGetsKilled",source,vehkiller) end end end if attacker and attacker == getLocalPlayer() then damage = 100 if weapon == 37 then return end if weapon == 63 or weapon == 51 or weapon == 19 then setElementData(source,"blood",0) if getElementData(source,"blood") <= 0 then killPed ( source, attacker, weapon, bodypart ) end elseif weapon and weapon > 1 and attacker and getElementType(attacker) == "player" then damage = getWeaponDamage (weapon) if bodypart == 9 then damage = damage*1.5 headshot = true end setElementData(source,"blood",getElementData(source,"blood")-math.random(damage*0.95,damage*1.25)) if getElementData(source,"blood") <= 0 then triggerServerEvent("onZombieGetsKilled",source,attacker,headshot) end end end end addEventHandler ( "onClientPedDamage", getRootElement(), pedGetDamageDayZ ) function checkStats() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"bleeding") > 20 then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-getElementData(getLocalPlayer(),"bleeding")) else setElementData(getLocalPlayer(),"bleeding",0) end if getElementData(getLocalPlayer(),"blood") < 0 then if not getElementData(getLocalPlayer(),"isDead") then triggerServerEvent("kilLDayZPlayer",getLocalPlayer(),false,false) end end end end setTimer(checkStats,3000,0) function createBloodForBleedingPlayers () if getElementData(getLocalPlayer(),"logedin") then local x,y,z = getElementPosition(getLocalPlayer()) for i,player in ipairs(getElementsByType("player")) do local bleeding = getElementData(player,"bleeding") or 0 if bleeding > 0 then local px,py,pz = getPedBonePosition (player,3) local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if bleeding > 600 then number = 5 elseif bleeding > 300 then number = 3 elseif bleeding > 100 then number = 1 else number = 0 end if pdistance <= 120 then fxAddBlood ( px,py,pz,0,0,0,number, 1 ) end end end end end setTimer(createBloodForBleedingPlayers,300,0) function checkBrokenbone() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"brokenbone") then toggleControl ( "jump", false ) toggleControl ( "sprint", false ) else toggleControl ( "jump", true ) toggleControl ( "sprint", true ) end end end setTimer(checkBrokenbone,1400,0) function setPain() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"pain") then local x,y,z = getElementPosition(getLocalPlayer()) createExplosion (x,y,z+15,8,false,1.0,false) local x, y, z, lx, ly, lz = getCameraMatrix() x, lx = x + 1, lx + 1 setCameraMatrix(x,y,z,lx,ly,lz) setCameraTarget (getLocalPlayer()) end end end setTimer(setPain,1500,0) function checkCold() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"temperature") <= 34 then setElementData(getLocalPlayer(),"cold",true) setElementData(getLocalPlayer(), "grip",1) end end end setTimer(checkCold,3000,0) function setCold() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"cold") then local x,y,z = getElementPosition(getLocalPlayer()) createExplosion (x,y,z+15,8,false,0.5,false) local x, y, z, lx, ly, lz = getCameraMatrix() -- Get the current location and lookat of camera end end end setTimer(setCold,1500,0) function checkPlayerSickness () if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"sick") == 60 then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.random(123,185)) end end end setTimer ( checkPlayerSickness, 5000,0) function checkInfection1() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"infection_zom") == 1 then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.random(232,481)) end end end setTimer(checkInfection1,15000,0) function checkInfection2() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"infection_zom") == 2 then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.random(431,683)) end end end setTimer(checkInfection2,25000,0) function checkInfection3() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"infection_zom") == 3 then setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-math.random(732,981)) end end end setTimer(checkInfection3,35000,0) function infectionSound() if getElementData(getLocalPlayer(), "logedin") then local x, y, z = getElementPosition ( getLocalPlayer ( ) ) if getElementData(getLocalPlayer(),"infection_zom") >= 1 then local soun = math.random(0,2) cough = playSound3D("sounds/cough_"..soun..".ogg", x, y, z, false) setSoundMaxDistance(cough,20) end end end setTimer (infectionSound,30000, 0) setTimer(function() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"grip") == 1 then setPedAnimation(getLocalPlayer(),"FOOD","EAT_Vomit_P") local x,y,z = getElementPosition(getLocalPlayer()) local sound = playSound3D("sounds/sneezing.mp3",x,y,z,false) setSoundMaxDistance(sound,20) setTimer(function() setPedAnimation(getLocalPlayer()) end,1000,1) end end end,90000,0) --[[ function checkPlayerSickness () if getElementData(getLocalPlayer(),"logedin") then setElementData(getLocalPlayer(),"sick",getElementData(getLocalPlayer(),"sick")-1) end end setTimer ( checkPlayerSickness, 300000,0) ]] playTrapSoundClient = function() local x,y,z = getElementPosition ( source ) local trap = playSound3D ( "sounds/trap.ogg", x, y, z,false) setSoundMaxDistance(trap,20) end addEvent("playTrapSound", true) addEventHandler("playTrapSound", getRootElement(), playTrapSoundClient) function playTrapSound_voul() if getElementData(getLocalPlayer(), "logedin") then local x,y,z = getElementPosition ( source ) local voul = math.random(0,4) voul = playSound3D("sounds/scream_short_"..voul..".ogg", x, y, z, false) setSoundMaxDistance(voul,20) local animR = math.random(1,4) if animR == 1 then setPedAnimation(getLocalPlayer(), "ped", "KO_shot_face") elseif animR == 2 then setPedAnimation(getLocalPlayer(), "CRACK", "crckdeth3") elseif animR == 3 then setPedAnimation(getLocalPlayer(), "ped", "KO_shot_stom") elseif animR == 4 then setPedAnimation(getLocalPlayer(), "CRACK", "crckdeth2") end setTimer(function() setPedAnimation(getLocalPlayer()) end,2000,1) end end addEvent("playTrapSound_voul", true) addEventHandler("playTrapSound_voul", getRootElement(),playTrapSound_voul) local screenWidth,screenHeight = guiGetScreenSize() function updateIcons () if getElementData(getLocalPlayer(),"logedin") then --Nametags local x,y,z = getElementPosition(getLocalPlayer()) for i,player in ipairs(getElementsByType("player")) do setPlayerNametagShowing ( player, false ) if player ~= getLocalPlayer() then local vehicle = getPedOccupiedVehicle(player) local px,py,pz = getElementPosition (player) local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if pdistance <= 2 then --Get screenposition local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if sx and sy then --Draw Игровой ник if getElementData(player,"bandit") then text = string.gsub(getPlayerName(player), '#%x%x%x%x%x%x', '' ).." (Bandit)" else text = string.gsub(getPlayerName(player), '#%x%x%x%x%x%x', '' ) end local w = dxGetTextWidth(text,1.02,"default-bold") dxDrawText (text, sx-(w/2), sy, sx-(w/2), sy, tocolor ( 255, 255, 255, 200 ), 1.02, "default-bold" ) end end end end if not playerTarget then return end local x,y,z = getElementPosition(playerTarget) local x,y,distance = getScreenFromWorldPosition (x,y,z+0.5) distance = 20 if getElementData(playerTarget,"bandit") then text = string.gsub(getPlayerName(playerTarget), '#%x%x%x%x%x%x', '' ).." (Bandit)" else text = string.gsub(getPlayerName(playerTarget), '#%x%x%x%x%x%x', '' ) end local w = dxGetTextWidth(text,distance*0.033,"default-bold") --dxDrawText (text,x-(w/2),y,x-(w/2), y, tocolor ( 255, 255, 255, 200 ), distance*0.033, "default-bold" ) end end addEventHandler ( "onClientRender", getRootElement(), updateIcons ) playerTarget = false function targetingActivated ( target ) if ( target ) and getElementType(target) == "player" then playerTarget = target else playerTarget = false end end addEventHandler ( "onClientPlayerTarget", getRootElement(), targetingActivated ) function dayZDeathInfo() fadeCamera(false, 1.0, 0, 0, 0 ) showDayZDeathScreen() if isElement(comaBackground) then destroyElement(comaBackground) end setTimer(function() guiSetText(deadText, "Te vei respawna în 10 secunde.") local number = 10 setTimer(function() number = number-1 guiSetText(deadText, "Te vei respawna în "..number.." secunde.") if number < 1 then guiSetVisible(deadBackground,false) if isElement(deadBackground) then destroyElement(deadBackground) end end end, 1000, 10) end,5000,1) end addEvent("onClientPlayerDeathInfo",true) addEventHandler("onClientPlayerDeathInfo",getRootElement(),dayZDeathInfo) function showDayZDeathScreen() fadeCamera(true, 1.5) deadBackground = guiCreateStaticImage(0,0,1,1,"images/dead.jpg",true) deadText = guiCreateLabel(0,0.8,1,0.2,"Ai murit!",true,deadBackground) guiLabelSetHorizontalAlign(deadText, "center", false) guiLabelSetVerticalAlign(deadText, "center") guiLabelSetColor ( deadText, 249,60,4 ) end --[[ function showWhiteScreen ( attacker, weapon, bodypart ) if weapon ~= 17 then whitescreen = guiCreateStaticImage(0,0,1,1,"images/white.png",true) setTimer(destroyElement,1000,1,whitescreen) end end ]] theTexts = {} theTextTimer = {} function startRollMessage(text, r, g, b) if #theTexts == 4 then destroyTextItem() end table.insert(theTexts,{text,r,g,b}) checkTimers() end addEvent("onRollMessageStart", true) addEventHandler("onRollMessageStart", getLocalPlayer(), startRollMessage) function startRollMessage2(head,text, r, g, b) if #theTexts == 4 then destroyTextItem() end table.insert(theTexts,{text,r,g,b}) checkTimers() end addEvent("displayClientInfo", true) addEventHandler("displayClientInfo", getLocalPlayer(), startRollMessage2) function destroyTextItem () table.remove(theTexts,1) end function checkTimers () if isTimer(theTextTimer["destroy"]) then killTimer(theTextTimer["destroy"]) end theTextTimer["destroy"] = setTimer(destroyTextItem,7000,4) end local screenWidth, screenHeight = guiGetScreenSize() local boxSpace = dxGetFontHeight(1,"default-bold")+dxGetFontHeight(1,"default-bold")*0.3 addEventHandler("onClientRender", getRootElement(), function() for id, value in pairs(theTexts) do dxDrawingColorText(value[1],screenWidth*0.30125, screenHeight-id*boxSpace+0.998, screenWidth*0.7, screenHeight-(id-1)*boxSpace, tocolor(0,0,0,255),170, 1.0, "sans", "center", "center") dxDrawingColorText(value[1],screenWidth*0.3, screenHeight-id*boxSpace, screenWidth*0.7, screenHeight-(id-1)*boxSpace, tocolor(255,255,255,255),170, 1.0, "sans", "center", "center") end end) function setVolume() value = 0 if getPedMoveState (getLocalPlayer()) == "stand" then value = 0 elseif getPedMoveState (getLocalPlayer()) == "walk" then value = 20 elseif getPedMoveState (getLocalPlayer()) == "powerwalk" then value = 40 elseif getPedMoveState (getLocalPlayer()) == "jog" then value = 80 elseif getPedMoveState (getLocalPlayer()) == "sprint" then value = 100 elseif getPedMoveState (getLocalPlayer()) == "crouch" then value = 0 elseif not getPedMoveState (getLocalPlayer()) then value = 20 end if isPedInVehicle (getLocalPlayer()) then value = 100 end if value > 100 then value = 100 end setElementData(getLocalPlayer(),"volume",value) end setTimer(setVolume,300,0) function setVisibility() value = 0 if getPedMoveState (getLocalPlayer()) == "stand" then value = 60 elseif getPedMoveState (getLocalPlayer()) == "walk" then value = 60 elseif getPedMoveState (getLocalPlayer()) == "powerwalk" then value = 60 elseif getPedMoveState (getLocalPlayer()) == "jog" then value = 60 elseif getPedMoveState (getLocalPlayer()) == "sprint" then value = 60 elseif getPedMoveState (getLocalPlayer()) == "crouch" then value = 20 elseif not getPedMoveState (getLocalPlayer()) then value = 20 end if isPedInVehicle (getLocalPlayer()) then value = 0 end setElementData(getLocalPlayer(),"visibly",value) end setTimer(setVisibility,300,0) bindKey("aim_weapon","both",function (_,state) if getPedWeaponSlot(getLocalPlayer()) == 6 and getElementData(getLocalPlayer(),"selectedWeapon") ~= "Lee Enfield" or getPedWeaponSlot(getLocalPlayer()) == 9 then if state == "down" then alpha = 0 elseif state == "up" then alpha = 255 end for i,v in pairs (clothSlots) do local object = getElementData(getLocalPlayer(),i.."Object" ) if object and isElement ( object ) then setElementAlpha ( object, alpha ) end end end end) local weaponObject = { ["2423"] = true, ["2426"] = true, ["2431"] = true, ["2434"] = true, ["2439"] = true, ["2441"] = true, ["2444"] = true, ["2266"] = true, } local weaponObject2 = { ["1731"] = true, ["1712"] = true, } bindKey("aim_weapon","both",function (_,state) if getPedWeaponSlot(getLocalPlayer()) == 6 or getPedWeaponSlot(getLocalPlayer()) == 9 then if state == "down" then alpha = 0 elseif state == "up" then alpha = 255 end for _, obj in ipairs(getElementsByType ("object",root,true)) do if isElementAttachedToBone(obj) then local id = getElementModel(obj) if weaponObject[""..tostring(id)] then setElementAlpha(obj,alpha) break end end end end end) bindKey("aim_weapon","both",function (_,state) if getPedWeaponSlot(getLocalPlayer()) == 6 or getPedWeaponSlot(getLocalPlayer()) == 9 then if state == "down" then alpha = 0 elseif state == "up" then alpha = 255 end for _, obj in ipairs(getElementsByType ("object",root,true)) do if isElementAttachedToBone(obj) then local id = getElementModel(obj) if weaponObject2[""..tostring(id)] then setElementAlpha(obj,alpha) break end end end end end) local details = { {"Tire_inVehicle"}, {"Engine_inVehicle"}, {"Parts_inVehicle"}, } --[[ Сситема поломки деталей addEventHandler("onClientVehicleDamage",getRootElement(),function(attacker,weapon,loss,x,y,z,tyre) cancelEvent() local parent = getElementData(source,"parent") if getElementData(parent,"vehicle_armor") > 0 then if getElementData(parent,"vehicle_armor")-loss < 1 then local hp = math.floor(getElementData(parent,"vehicle_armor") - loss) if hp < 0 then hp = hp * -1 end setElementHealth(source,getElementHealth(source) - hp) setElementData(parent,"vehicle_armor",0) return true end setElementData(parent,"vehicle_armor",getElementData(parent,"vehicle_armor")-loss) return true end for _, data in ipairs (details) do if parent and isElement(parent) then local detail = getElementData(parent,data[1]) or 0 if detail > 0 then local detail_dam = getElementData (parent,data[1].."dam") or 0 if detail_dam >= 6 then local random = math.random(0.05,#details) local detale = getElementData(parent,details[random][1]) or 0 if detale > 0 then setElementData(parent,details[random][1],detale - 1) setElementData(parent,details[random][1].."dam",0) checkVehicleMovable(source) break end else setElementData(parent, data[1].."dam", detail_dam+1) break end end end end setElementHealth (source,getElementHealth(source) - loss) end) ]] addEventHandler("onClientVehicleDamage",getRootElement(),function(attacker,weapon,loss,x,y,z,tyre) cancelEvent() local parent = getElementData(source,"parent") if getElementData(parent,"vehicle_armor") > 0 then if getElementData(parent,"vehicle_armor")-loss < 1 then local hp = math.floor(getElementData(parent,"vehicle_armor") - loss) if hp < 0 then hp = hp * -1 end setElementHealth(source,getElementHealth(source) - hp) setElementData(parent,"vehicle_armor",0) return true end setElementData(parent,"vehicle_armor",getElementData(parent,"vehicle_armor")-loss) return true end setElementHealth (source,getElementHealth(source) - loss) end) --Ракети на битр итд w, h = guiGetScreenSize () local function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end local poses = { [601] = {0, 0, 0}, } addEvent("cl_bulletSpawn", true) addEventHandler("cl_bulletSpawn",getRootElement(),function(x, y, z, player) createProjectile(player,19,x,y,z+3) end) function fireBTR() setTimer(function() local veh = getPedOccupiedVehicle(localPlayer) if isElement(veh) and getElementModel(veh) == 601 then local xv,yv,zv = getElementVelocity(veh) local mid = getElementModel(veh) local x,y,z = getPositionFromElementOffset(veh, poses[mid][1],poses[mid][2],poses[mid][3]+math.abs(zv*5)) x,y = x+xv*5, y+yv*5 triggerServerEvent("sv_bulletSpawn", getRootElement(), x, y, z, localPlayer) end end,5000,1) end function disableFireSwat ( theVehicle, seat ) if ( getElementModel ( theVehicle ) == 601 ) then toggleControl ( "vehicle_fire", false ) else toggleControl ( "vehicle_fire", true ) end end addEventHandler ( "onClientPlayerVehicleEnter", getLocalPlayer(), disableFireSwat ) function disableFireSwat1 ( theVehicle, seat ) if ( getElementModel ( theVehicle ) == 601 ) then toggleControl ( "lctrl_fire", false ) else toggleControl ( "lctrl_fire", true ) end end addEventHandler ( "onClientPlayerVehicleEnter", getLocalPlayer(), disableFireSwat1 ) function renderVehCross () local veh = getPedOccupiedVehicle(localPlayer) if isElement(veh) and getElementModel(veh) == 601 then dxDrawImage (w/2-128, h/2-128,256,256,"images/shotgun.png",0,0,0) end end addEventHandler('onClientRender', root, renderVehCross ) function SwatFireEnter ( theVehicle, seat ) local col = getElementData(theVehicle,"parent") if ( getElementModel ( theVehicle ) == 601 ) then if getElementData(col,"raket") > 0 then bindKey("mouse1","down",fireBTR) triggerEvent("displayClientInfo",getLocalPlayer(),"","Mai sunt "..getElementData(col,"raket").." rachete",0,255,0) else unbindKey("mouse1","down",fireBTR) triggerEvent("displayClientInfo",getLocalPlayer(),"","Nu mai sunt rachete!",255,22,0) end end end addEventHandler ( "onClientPlayerVehicleEnter", getLocalPlayer(), SwatFireEnter ) armedVehicles = {[601]=true} --armedVehicles = {[425]=true, [520]=true, [476]=true, [447]=true, [430]=true, [432]=true, [464]=true, [407]=true, [601]=true} function vehicleWeaponFire(key, keyState, vehicleFireType) local vehModel = getElementModel(getPedOccupiedVehicle(localPlayer)) if (armedVehicles[vehModel]) then triggerEvent("onClientVehicleWeaponFire", localPlayer, vehicleFireType, vehModel) end end bindKey("vehicle_fire", "down", vehicleWeaponFire, "primary") bindKey("vehicle_secondary_fire", "down", vehicleWeaponFire, "secondary") function eventVehicleFire(theVehicle) local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) local col = getElementData(theVehicle,"parent") if getElementData(col,"raket") > 0 then bindKey("mouse1","down",fireBTR) setElementData(col,"raket",getElementData(col,"raket")- 1) local sound = playSound("sounds/hydraGunSound.ogg") setSoundVolume(sound, 0.6) end if getElementData(col,"raket") == 0 then unbindKey("mouse1","down",fireBTR) triggerEvent("displayClientInfo",getLocalPlayer(),"","Nu mai sunt rachete!",255,22,0) end end addEvent("onClientVehicleWeaponFire", false) addEventHandler("onClientVehicleWeaponFire", getLocalPlayer(), eventVehicleFire) ------------------------------------------------- function checkVehicleMovable(veh) if isElement(veh) then local model = getElementModel(veh) if model then local tires,engine,parts = getVehicleAddonInfos (model) if((getElementData(col,"Tire_inVehicle") or 0) < tonumber(tires)) then setVehicleEngineState (veh,false) return end if((getElementData(col,"Engine_inVehicle") or 0) < tonumber(engine)) then setVehicleEngineState(veh,false) return end if((getElementData(col,"Parts_inVehicle") or 0) < tonumber(parts)) then setVehicleEngineState(veh,false) return end end end end function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="кмч" or unit==1 or unit =='1') then return math.floor((x^2 + y^2 + z^2) ^ 0.5 * 100) else return math.floor((x^2 + y^2 + z^2) ^ 0.5 * 100 * 1.609344) end else return false end end lightState = 0 localPlayer = getLocalPlayer () addEventHandler("onClientVehicleEnter", getRootElement(), function(thePlayer, seat) if thePlayer == getLocalPlayer() then if seat == 0 then bindKey ( "l", "down", showLightState_panel ) addEventHandler("onClientRender",root, showPanel_main ) lightState = getVehicleOverrideLights ( source ) or 0 end end end ) addEventHandler("onClientVehicleExit", getRootElement(), function(thePlayer, seat) if thePlayer == getLocalPlayer() then if seat == 0 then removeEventHandler("onClientRender",root, showPanel_main ) unbindKey ( "l", "down" ) lightState = 0 end end end ) function showLightState_panel () if lightState == 0 or lightState == 1 then lightState = 2 setVehicleOverrideLights( getPedOccupiedVehicle ( localPlayer ), 2 ) else setVehicleOverrideLights( getPedOccupiedVehicle ( localPlayer ), 1 ) lightState = 0 end end function showPanel_main () if not getPedOccupiedVehicle ( localPlayer ) then removeEventHandler("onClientRender",root, showPanel_main ) unbindKey ( "l", "down" ) lightState = 0 return true end end local color = {} local radio = {} local sounds = {} local sW,sH = guiGetScreenSize() addEventHandler("onClientRender",getRootElement(),function() local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then local parent = getElementData(veh,"parent") local eng_health = getElementData(parent,"Engine_inVehicledam") or 0 local tire_health = getElementData(parent,"Tire_inVehicledam") or 0 local parts_health = getElementData(parent,"Parts_inVehicledam") or 0 local fuel = getElementData(parent,"fuel") or 0 local maxfuel = getElementData(veh,"maxfuel") if maxfuel == false or nil then return end if fuel == false or nil then return end if fuel > maxfuel/2 then color.fuel_r = 0 color.fuel_g = 255 color.fuel_b = 0 elseif fuel <= maxfuel/2 and fuel > 10 then color.fuel_r = 255 color.fuel_g = 255 color.fuel_b = 0 elseif fuel < 10 then color.fuel_r = 255 color.fuel_g = 0 color.fuel_b = 0 end --statusbar fuel if maxfuel == 140 then maxpalivo = -1.35 elseif maxfuel == 100 then maxpalivo = -0.98 elseif maxfuel == 80 then maxpalivo = -0.78 elseif maxfuel == 60 then maxpalivo = -0.58 elseif maxfuel == 50 then maxpalivo = -0.48 elseif maxfuel == 30 then maxpalivo = -0.29 elseif maxfuel == 0 then maxpalivo = -1.35 end if lightState == 0 or lightState == 1 then color1,color2,color3 = 255,255,255 dxDrawText ( " OFF",sW * 0.070,sH * 0.410-0.001,sW * 0.060,sH * 0.015, tocolor ( color1,color2,color3, 200 ), 1, "sans", "left", "top", false, false, true) else color1,color2,color3 = 215,200,105 dxDrawText ( " ON",sW * 0.070,sH * 0.410-0.001,sW * 0.060,sH * 0.015, tocolor ( color1,color2,color3, 200 ), 1, "sans", "left", "top", false, false, true) end local speed = getElementSpeed(getPedOccupiedVehicle(getLocalPlayer()), "Km/h") if not speed then return end dxDrawText ( "SPD "..speed,sW * 0.007,sH * 0.330-0.001,sW * 0.060,sH * 0.015, tocolor ( color1,color2,color3, 200 ), 1, "sans", "left", "top", false, false, true) --statusbar palivo local palivo = math.floor(getElementData(getElementData(veh,"parent"),"fuel") or 0) dxDrawBox(sW * 0.10,sH * 0.446,5,-105,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.10,sH * 0.446,5,palivo/maxpalivo,tocolor(255,255,0,100),tocolor(color1,color2,color3,50)) -- statusbar armor local arm = math.floor(getElementData(getElementData(veh,"parent"),"vehicle_armor") or 0) dxDrawBox(sW * 0.12,sH * 0.446,5,-105,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.12,sH * 0.446,5,arm/-9.6,tocolor(0,0,255,100),tocolor(color1,color2,color3,50)) -- statusbar health local health = math.floor(getElementHealth(veh) or 0) dxDrawBox(sW * 0.11,sH * 0.446,5,-105,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.11,sH * 0.446,5,health/-9.6,tocolor(0,255,0,100),tocolor(color1,color2,color3,50)) -- box name detail dxDrawBox(sW * 0.005,sH * 0.330,sW * 0.060,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.005,sH * 0.350,sW * 0.060,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.005,sH * 0.370,sW * 0.060,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.005,sH * 0.390,sW * 0.060,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.005,sH * 0.430,sW * 0.060,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.005,sH * 0.410,sW * 0.060,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) -- box detail kolvo dxDrawBox(sW * 0.070,sH * 0.350,sW * 0.025,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.070,sH * 0.370,sW * 0.025,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.070,sH * 0.390,sW * 0.025,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.070,sH * 0.430,sW * 0.025,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) dxDrawBox(sW * 0.070,sH * 0.410,sW * 0.025,sH * 0.015,tocolor(0,0,0,100),tocolor(color1,color2,color3,50)) -- box detail status --dxDrawBox(sW * 0.100,sH * 0.350,sW * 0.003,sH * 0.015,tocolor(color.engine_r,color.engine_g,color.engine_b,100),tocolor(255,255,255,50)) -- engine --dxDrawBox(sW * 0.100,sH * 0.370,sW * 0.003,sH * 0.015,tocolor(color.tire_r,color.tire_g,color.tire_b,100),tocolor(255,255,255,50)) -- tire --dxDrawBox(sW * 0.100,sH * 0.390,sW * 0.003,sH * 0.015,tocolor(color.parts_r,color.parts_g,color.parts_b,100),tocolor(255,255,255,50)) -- needparts --dxDrawBox(sW * 0.100,sH * 0.430,sW * 0.003,sH * 0.015,tocolor(color.fuel_r,color.fuel_g,color.fuel_b,100),tocolor(255,255,255,50)) -- fuel --dxDrawBox(sW * 0.100,sH * 0.410,sW * 0.003,sH * 0.015,tocolor(0,255,0,100),tocolor(255,255,255,50)) -- far -- text for box 1 name detail dxDrawText ("Baterie",sW * 0.007,sH * 0.350-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),1,"sans") dxDrawText ("Roți",sW * 0.007,sH * 0.370-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),1,"sans") dxDrawText ("Bujie",sW * 0.007,sH * 0.390-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),1,"sans") dxDrawText ("Combustibil",sW * 0.007,sH * 0.430-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),1,"sans") dxDrawText ("Faruri",sW * 0.007,sH * 0.410-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),1,"sans") -- text for box 2 kolvo detail dxDrawText ("".. math.floor(tostring(getElementData(getElementData(veh,"parent"),"Engine_inVehicle") or 0)) .."/".. tostring(getElementData(veh,"needengines")).. "",sW * 0.072,sH * 0.350-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),1,"sans") -- engine dxDrawText ("".. math.floor(tostring(getElementData(getElementData(veh,"parent"),"Tire_inVehicle") or 0)) .."/".. tostring(getElementData(veh,"needtires")).."",sW * 0.072,sH * 0.370-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),1,"sans") -- tire dxDrawText ("".. math.floor(tostring(getElementData(getElementData(veh,"parent"),"Parts_inVehicle") or 0)) .."/"..tostring(getElementData(veh,"needparts")).."",sW * 0.072,sH * 0.390-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),1,"sans") -- need parts dxDrawText ("".. math.floor(tostring(getElementData(getElementData(veh,"parent"),"fuel") or 0)).."/"..tostring(getElementData(veh,"maxfuel")).."",sW * 0.070,sH * 0.430-0.001,sW * 0.060,sH * 0.015,tocolor(color1,color2,color3,200),0.9,"sans") -- fuel end end) function dxDrawBox(x, y, w, h, rcolor, lcolor) dxDrawLine(x - 1, y - 1, x - 1, y + h, lcolor, 1) dxDrawLine(x + w, y - 1, x + w, y + h, lcolor, 1) dxDrawLine(x - 1, y + h, x + w, y + h, lcolor, 1) dxDrawLine(x - 1, y - 1, x + w, y - 1, lcolor, 1) dxDrawRectangle(x, y, w, h, rcolor) end addEventHandler("onClientResourceStart",resourceRoot,function() radio["WINDOW"] = guiCreateWindow((sW - 321) / 2, (sH - 258) / 2, 321, 258, "Radio", false) guiWindowSetSizable(radio["WINDOW"], false) radio["BUTTON_PLAY"] = guiCreateButton(10, 229, 87, 19, "Pornește", false, radio["WINDOW"]) radio["BUTTON_CLOSE"] = guiCreateButton(224, 229, 87, 19, "Închide", false, radio["WINDOW"]) radio["GRIDLIST"] = guiCreateGridList(12, 32, 299, 187, false, radio["WINDOW"]) radio["COLUMN"] = guiGridListAddColumn(radio["GRIDLIST"], "Listă", 0.9) addEventHandler("onClientGUIClick",radio["BUTTON_CLOSE"],function() guiSetVisible(radio["WINDOW"],false) showCursor(false) end,false) addEventHandler("onClientGUIClick",radio["BUTTON_PLAY"],function() local inVehicle = getPedOccupiedVehicle(getLocalPlayer()) local select = guiGridListGetItemText(radio["GRIDLIST"],guiGridListGetSelectedItem(radio["GRIDLIST"]),1) if inVehicle and select and getElementData(inVehicle,"vehicle:receiver") == false then for i, data in ipairs(playlist) do if select == data[1] then setElementData(inVehicle,"vehicle:directive",data[2]) setElementData(inVehicle,"vehicle:receiver",true) guiSetText(radio["BUTTON_PLAY"],"Pornit") break end end else setElementData(inVehicle,"vehicle:receiver",false) setElementData(inVehicle,"vehicle:directive",nil) guiSetText(radio["BUTTON_PLAY"],"Oprit") end end,false) guiSetVisible(radio["WINDOW"],false) end) --[[ bindKey("u","down",function() local inVehicle = getPedOccupiedVehicle(getLocalPlayer()) if inVehicle then guiSetVisible(radio["WINDOW"],not guiGetVisible(radio["WINDOW"])) showCursor(not isCursorShowing()) guiGridListClear(radio["GRIDLIST"]) for i, data in ipairs(playlist) do local row = guiGridListAddRow(radio["GRIDLIST"]) guiGridListSetItemText(radio["GRIDLIST"],row,radio["COLUMN"],data[1],false,false) end if getElementData(inVehicle,"vehicle:receiver") == true then guiSetText(radio["BUTTON_PLAY"],"Включена") else guiSetText(radio["BUTTON_PLAY"],"Выключена") end end end) ]] addEventHandler( "onClientElementStreamIn", getRootElement( ),function ( ) if getElementType( source ) == "vehicle" then if getElementData(source,"vehicle:receiver") == true then attach3DSound(source,getElementData(source,"vehicle:directive")) end end end) addEventHandler( "onClientElementStreamOut", getRootElement( ),function ( ) if getElementType( source ) == "vehicle" then if getElementData(source,"vehicle:receiver") == true then detach3DSound(source) end end end) addEventHandler("onClientElementDataChange",getRootElement(),function(dataName) if getElementType(source) == "vehicle" then if dataName == "isExploded" and getElementData(source,"isExploded") == true and getElementData(source,"vehicle:receiver") == true then detach3DSound(source) end if dataName == "vehicle:receiver" and getElementData(source,"vehicle:receiver") == false then detach3DSound(source) end if dataName == "vehicle:receiver" and getElementData(source,"vehicle:receiver") == true then attach3DSound(source,getElementData(source,"vehicle:directive")) end end end) function detach3DSound(fromElement) if sounds[fromElement] ~= nil then local soundElement = sounds[fromElement] detachElements(soundElement,fromElement) stopSound(soundElement) sounds[fromElement] = nil end end addEvent("detach3DSound",true) addEventHandler("detach3DSound",getRootElement(),detach3DSound) function attach3DSound(toElement,directive) local x,y,z = getElementPosition(toElement) local soundElement = init3DSound(directive,x,y,z,toElement) sounds[toElement] = soundElement end addEvent("attach3DSound",true) addEventHandler("attach3DSound",getRootElement(),attach3DSound) function init3DSound(directive,x,y,z,toElement) local sound3d = playSound3D(directive,0,0,0) setSoundMaxDistance(sound3d,15) attachElements(sound3d,toElement,0,0,0) setElementData(toElement,"vehicle:directive",directive) setElementData(toElement,"vehicle:receiver",true) return sound3d end function updatePlayTime() if getElementData(getLocalPlayer(),"logedin") then local playtime = getElementData(getLocalPlayer(),"alivetime") setElementData(getLocalPlayer(),"alivetime",playtime+1) end end setTimer(updatePlayTime,60000,0) local rotate = 0 function renderComa() if getElementData(getLocalPlayer(),"isDead") then local otComa = getTimestamp() setElementData(getLocalPlayer(),"inComa",false) triggerServerEvent("setPedComaAnimation",getLocalPlayer(),false) removeEventHandler("onClientRender",root,renderComa) setElementData(getLocalPlayer(),"notComa",otComa+30*1000) end if rotate == 180 then if not hourglass then hourglass = setTimer(function() rotate = rotate+4 killTimer(hourglass) hourglass = false end,1000,1) end elseif rotate == 360 then if not hourglass2 then hourglass2 = setTimer(function() rotate = 0 killTimer(hourglass2) hourglass2 = false end,1000,1) end else rotate = rotate+4 end dxDrawImage((sW - 200) / 2, (sH - 200) / 2, 200, 200, "images/circle.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage((sW - 200) / 2, (sH - 200) / 2, 200, 200, "images/hourglass.png",rotate, 0, 0, tocolor(255, 255, 255, 255), false) end function checkBloodComa() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"blood") < 3000 then -- if not getElementData(getLocalPlayer(),"inComa") and not getElementData(getLocalPlayer(),"isDead") then if getElementData(getLocalPlayer(),"notComa") > getTimestamp() then return end putPlayerInComa() end end end end setTimer(checkBloodComa,7000,0) function putPlayerInComa() if not getElementData(getLocalPlayer(),"inComa") and not getElementData(getLocalPlayer(),"isDead") then if isElementInWater(getLocalPlayer()) then return end setElementData(getLocalPlayer(),"inComa",true) triggerServerEvent("setPedComaAnimation",getLocalPlayer(),true) addEventHandler("onClientRender",root,renderComa) setTimer(finishComa,math.random(30,60)*1000,1) end end function finishComa() if getElementData(getLocalPlayer(),"inComa") and not getElementData(getLocalPlayer(),"isDead") then local otComa = getTimestamp() setElementData(getLocalPlayer(),"inComa",false) triggerServerEvent("setPedComaAnimation",getLocalPlayer(),false) removeEventHandler("onClientRender",root,renderComa) setElementData(getLocalPlayer(),"notComa",otComa+30*1000) end end function getTimestamp(year, month, day, hour, minute, second) local monthseconds = { 2678400, 2419200, 2678400, 2592000, 2678400, 2592000, 2678400, 2678400, 2592000, 2678400, 2592000, 2678400 } local timestamp = 0 local datetime = getRealTime() year, month, day = year or datetime.year + 1900, month or datetime.month + 1, day or datetime.monthday hour, minute, second = hour or datetime.hour, minute or datetime.minute, second or datetime.second for i=1970, year-1 do timestamp = timestamp + (isLeapYear(i) and 31622400 or 31536000) end for i=1, month-1 do timestamp = timestamp + ((isLeapYear(year) and i == 2) and 2505600 or monthseconds[i]) end timestamp = timestamp + 86400 * (day - 1) + 3600 * hour + 60 * minute + second timestamp = timestamp - 3600 if datetime.isdst then timestamp = timestamp - 3600 end return timestamp end function isLeapYear(year) if year then year = math.floor(year) else year = getRealTime().year + 1900 end return ((year % 4 == 0 and year % 100 ~= 0) or year % 400 == 0) end function drawPlayersInTeam (x,y) local gangname = getElementData(getLocalPlayer(),"gang") if gangname then if gangname == "None" then return end for i, player in ipairs(getElementsByType("player")) do if gangname == getElementData(player,"gang") and player ~= localPlayer then local playerx,playery = getElementPosition ( player ) local _,_,rotplayer = getElementRotation( player ) if getDistanceBetweenPoints2D ( x,y,playerx,playery) < 200 then local markx, marky if x > 0 and y > 0 then markx, marky = centerleft+(math.abs(playerx/2)-math.abs(x/2)), centerleft-(math.abs(playery/2)-math.abs(y/2)) elseif x < 0 and y < 0 then markx, marky = centerleft-(math.abs(playerx/2)-math.abs(x/2)), centerleft+(math.abs(playery/2)-math.abs(y/2)) elseif x < 0 and y > 0 then markx, marky = centerleft-(math.abs(playerx/2)-math.abs(x/2)), centerleft-(math.abs(playery/2)-math.abs(y/2)) elseif x > 0 and y < 0 then markx, marky = centerleft+(math.abs(playerx/2)-math.abs(x/2)), centerleft+(math.abs(playery/2)-math.abs(y/2)) end dxDrawImage(markx-(playerSizeX/2), marky-(playerSizeY/2), playerSizeX, playerSizeY, playerTexture,-rotplayer, 0, 0, tocolor(0, 0, 255, 255)) end end end else return true end end function createGPS() if getElementData(getLocalPlayer(),"logedin") then local x,y = getElementPosition(getLocalPlayer()) local _, _,camrot = getElementRotation(getCamera()) dxSetRenderTarget(rr) dxDrawImageSection(0,0,xsize,xsize,1500+x/2-centerleft,1500-y/2-centerleft,xsize,xsize,mapTexture,0,0,0) drawPlayersInTeam(x,y) dxSetRenderTarget() dxSetRenderTarget(rr2) dxDrawImage(0,0,xsize,xsize,rr,camrot) dxSetRenderTarget() dxDrawImageSection(mapX+20,mapY-81,mapSizeX,mapSizeY,(xsize-mapSizeX)/2,(xsize-mapSizeY)/2,mapSizeX,mapSizeY,rr2,0,0,0) dxDrawImage(playerX-playerSizeX/2,playerY-playerSizeY/2,playerSizeX,playerSizeY,playerTexture,0,0,0,tocolor(255, 0, 0, 255)) dxDrawImage(mapX+7,mapY-103,gpsX,gpsY,gpsTexture) end end --addEventHandler("onClientRender", getRootElement(), createGPS) addEventHandler ( "onClientElementDataChange", getRootElement(), function ( dataName, oldValue ) if source == localPlayer and dataName == "GPS" then local newValue = getElementData ( localPlayer, "GPS" ) or 0 oldValue = oldValue or 0 if oldValue <= 0 and newValue > 0 then addEventHandler("onClientRender", getRootElement(), createGPS) elseif oldValue > 0 and newValue <= 0 then removeEventHandler("onClientRender", getRootElement(), createGPS) end end end ) fixbag = { {"Fumigenă",17}, {"Flashbang",18}, {"Grenadă M67",16}, {"Cuțit de vânătoare",4}, {"Topor",8}, {"Binoclu",43}, {"Bâtă de Baseball",5}, {"Bâtă de golf",2}, {"Drujbă",9}, {"Lopată",6}, {"Pumni",0}, } function renderHUD() local weaponfix = getElementData(getLocalPlayer(),"currentweapon_1") if getElementData(getLocalPlayer(),"logedin") then local zone = getZoneName (getElementPosition(getLocalPlayer())) local x,y = guiGetScreenSize() local paint_color = tocolor(255,255,255) local hud_size = 1 local font = "sans" local text_size = dxGetFontHeight ( hud_size, font ) local screenWidth,screenHeight = guiGetScreenSize() local bX, bY = screenWidth/2,screenHeight/2 clip = getPedAmmoInClip ( getLocalPlayer() ) bala = getPedTotalAmmo ( getLocalPlayer() )-clip setPlayerHudComponentVisible ("weapon", false ) setPlayerHudComponentVisible ("ammo", false) setPlayerHudComponentVisible ("clock", false) if bala < 0 then bala = 0 end local x, y = guiGetScreenSize ( ) posy3= 5 posx2= x-55 posy2= posy3+text_size posx3= x-55 local weap = getElementData (localPlayer,"selectedWeapon") local ammotext = clip .." | "..bala local xlenght = x-20 if weap then for _, fix in ipairs(fixbag) do if getPedWeapon(getLocalPlayer()) >= 18 and getPedWeapon(getLocalPlayer()) < 43 then dxDrawText(weap,posx2-289, posy3+text_size+1, xlenght, y,tocolor(0,0,0,255),hud_size,font,"right","top",false,false,false) dxDrawText(weap,posx3-290, posy3+text_size, xlenght, y,paint_color,hud_size,font,"right","top",false,false,false) elseif getPedWeapon(getLocalPlayer()) == fix[2] then dxDrawText(fix[1],posx2-289, posy3+text_size+1, xlenght, y,tocolor(0,0,0,255),hud_size,font,"right","top",false,false,false) dxDrawText(fix[1],posx3-290, posy3+text_size, xlenght, y,paint_color,hud_size,font,"right","top",false,false,false) end if getPedWeapon(getLocalPlayer()) > 9 then dxDrawText(""..ammotext,posx3-289, posy2+text_size+1, xlenght, y,tocolor(0,0,0,255),hud_size,font,"right","top",false,false,false) dxDrawText(""..ammotext,posx3-290, posy2+text_size, xlenght, y,paint_color,hud_size,font,"right","top",false,false,false) end end end dxDrawText(zone, screenWidth * 0.01, screenHeight* 0.981, xlenght, y,tocolor(0,0,0,255),hud_size,font,"left","top",false,false,false) dxDrawText(zone, screenWidth * 0.01, screenHeight* 0.98, xlenght, y,paint_color,hud_size,font,"left","top",false,false,false) if getElementData(getLocalPlayer(),"Ceas") >= 1 then local hour, minutes = getTime() if minutes < 10 then add0 = "0" else add0 = "" end local time = hour..":"..add0..""..minutes dxDrawText(time,x*0.93-1,posy2+text_size*2+1, xlenght, y,tocolor(0,0,0,255),hud_size+0.1,font,"right","top",false,false,false) dxDrawText(time,x*0.93,posy2+text_size*2, xlenght, y,paint_color,hud_size+0.1,font,"right","top",false,false,false) end end end addEventHandler("onClientRender",getRootElement(),renderHUD) --[[ function shakeCamera(weapon) x,y,z = getPedBonePosition ( getLocalPlayer(), 26 ) if weapon == 22 then createExplosion ( x,y,z + 10,12,false,0.1,false) elseif weapon == 24 then createExplosion ( x,y,z + 10,12,false,0.2,false) elseif weapon == 25 then createExplosion ( x,y,z + 10,12,false,0.4,false) elseif weapon == 26 then createExplosion ( x,y,z + 10,12,false,0.5,false) elseif weapon == 27 then createExplosion ( x,y,z + 10,12,false,0.4,false) elseif weapon == 28 then createExplosion ( x,y,z + 10,12,false,0.1,false) elseif weapon == 29 then createExplosion ( x,y,z + 10,12,false,0.1,false) elseif weapon == 30 then createExplosion ( x,y,z+10,12,false,0.1,false) elseif weapon == 31 then createExplosion ( x,y,z + 10,12,false,0.1,false) elseif weapon == 32 then createExplosion ( x,y,z + 10,12,false,0.1,false) elseif weapon == 33 then createExplosion ( x,y,z + 10,12,false,0.1,false) elseif weapon == 38 then createExplosion ( x,y,z + 10,12,false,0.5,false) end end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), shakeCamera ) ]] Thanks in advance ^^
-
Hi guys, i really need help on this one. I get an error that makes my shader resource really buggy "WARNING: UNION_SHAIDER\c_night.lua:197 Bad argument @ 'dxSetShaderValue' [Expected material at argument 1, got boolean] " Here is the script, i hope you can help me, i really need help on this one ^^ . Ty in advance. --By Fanbox local maxDarkness = 0.4 -- [1] = lightest || [0] = darkest 1-- 0.05 2-- 0.1 3-- 0.5 4-- 0.3 5-- 0.4 local speed = 0.0001 -- 0.001 local b = 1 local shaderList = {} local fading = false local clone local nightShader InselMapStart = function() for i1 = 4212, 4222 do removeWorldModel(i1, 10000, 0, 0, 0) end for i2 = 4715, 4717 do removeWorldModel(i2, 10000, 0, 0, 0) end for i3 = 4720, 4725 do removeWorldModel(i3, 10000, 0, 0, 0) end for i4 = 4739, 4752 do removeWorldModel(i4, 10000, 0, 0, 0) end for i5 = 5057, 5059 do removeWorldModel(i5, 10000, 0, 0, 0) end for i6 = 5661, 5665 do removeWorldModel(i6, 10000, 0, 0, 0) end for i7 = 5990, 5992 do removeWorldModel(i7, 10000, 0, 0, 0) end for i8 = 6192, 6196 do removeWorldModel(i8, 10000, 0, 0, 0) end for i9 = 7072, 7097 do removeWorldModel(i9, 10000, 0, 0, 0) end for j1 = 7206, 7208 do removeWorldModel(j1, 10000, 0, 0, 0) end for j2 = 7221, 7226 do removeWorldModel(j2, 10000, 0, 0, 0) end for j3 = 7280, 7280 do removeWorldModel(j3, 10000, 0, 0, 0) end for j4 = 7331, 7333 do removeWorldModel(j4, 10000, 0, 0, 0) end for j5 = 7892, 7892 do removeWorldModel(j5, 10000, 0, 0, 0) end for j6 = 7942, 7944 do removeWorldModel(j6, 10000, 0, 0, 0) end for j7 = 8372, 8372 do removeWorldModel(j7, 10000, 0, 0, 0) end for j8 = 9088, 9089 do removeWorldModel(j8, 10000, 0, 0, 0) end for j9 = 9121, 9129 do removeWorldModel(j9, 10000, 0, 0, 0) end for k1 = 9154, 9159 do removeWorldModel(k1, 10000, 0, 0, 0) end for k2 = 9277, 9283 do removeWorldModel(k2, 10000, 0, 0, 0) end for k3 = 9285, 9286 do removeWorldModel(k3, 10000, 0, 0, 0) end for k4 = 9885, 9886 do removeWorldModel(k4, 10000, 0, 0, 0) end for k5 = 9932, 9934 do removeWorldModel(k5, 10000, 0, 0, 0) end for k6 = 10057, 10058 do removeWorldModel(k6, 10000, 0, 0, 0) end for k7 = 10146, 10147 do removeWorldModel(k7, 10000, 0, 0, 0) end for k8 = 11410, 11412 do removeWorldModel(k8, 10000, 0, 0, 0) end for k9 = 13461, 13461 do removeWorldModel(k9, 10000, 0, 0, 0) end for t1 = 13461, 13461 do removeWorldModel(t1, 10000, 0, 0, 0) end for t2 = 13484, 13485 do removeWorldModel(t2, 10000, 0, 0, 0) end for t3 = 13493, 13493 do removeWorldModel(t3, 10000, 0, 0, 0) end for t4 = 17954, 17957 do removeWorldModel(t4, 10000, 0, 0, 0) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), InselMapStart) local removables = { 'tx*', --'coronastar', --'shad_exp*', 'radar*', '*icon', 'font*', 'lampost_16clr', 'headlight', 'vehiclegeneric256', 'skybox_tex', 'siteM16' } function night_init() if getVersion ().sortable < '1.1.0' then return false end local testShader, tec = dxCreateShader('night.fx') if not testShader then outputChatBox('Could not create night shader. Please use debugscript 3') else nightShader = dxCreateShader('night.fx', 0, 0, false, "all") for c=48,122 do engineApplyShaderToWorldTexture(nightShader, string.format('%c*', c)) end for i,v in pairs(removables) do engineRemoveShaderFromWorldTexture(nightShader, v) end table.insert(shaderList, nightShader) end addEventHandler('onClientHUDRender', root, night_render) nightTimer = setTimer(night_check, 1000, 0) end function night_check() local hours, minutes = getTime() setSkyGradient(65,80,83,65,80,84) setFarClipDistance(200)-----Расстояник до тумана днём setFogDistance(15) if hours >= 5 and hours < 12 then fading = false setSkyGradient(65,80,83,65,80,84) setWeather (9) elseif hours >= 12 and hours < 18 then fading = false setSkyGradient(65,80,83,65,60,64) setWeather (15) elseif hours >= 18 and hours < 21 then fading = false setSkyGradient(65,80,83,55,70,74) setWeather (14) elseif hours >= 21 and hours < 5 then fading = false setSkyGradient(65,80,83,35,40,44) setWeather (12) else fading = true setSkyGradient( 0, 0, 0, 10, 10, 10 ) setFarClipDistance(100)--1000 setFogDistance(35)--100 end end function night_render() local int, dim = getElementInterior(localPlayer), getElementDimension(localPlayer) if fading then if b > maxDarkness then b = b - speed elseif b <= maxDarkness then b = maxDarkness end else if b < 1.0 then b = b + speed elseif b >= 1.0 then b = 1.0 end end for _,shader in ipairs(shaderList) do if int == 0 and dim == 0 then dxSetShaderValue(shader, 'NIGHT', b, b, b) else dxSetShaderValue(shader, 'NIGHT', 1.0, 1.0, 1.0) end end end night_init() local shaderMap = { ['img/1.union'] = { --'metalflooring4', 'forestfloorblendb', 'con2sand1c', 'sjmhoodlawn42b', 'venturas_fwend', 'pavemiddirt_law', 'hiway2sand1a', 'des_dam_conc', 'forestfloor3', 'grasstype4_forestblend', 'forestfloor_sones256', 'cw2_mounttrailblank', 'cw2_mounttrail', 'sw_sandgrass' , 'desertstones256forestmix', 'bow_abpave_gen', 'desgreengrassmix', 'grasstype4blndtomud', 'grasstype4blndtodirt', 'des_dirtgrassmix_grass4', 'grasstype10_4blend', 'rocktq128_forestblend2', 'forestfloor3_forest', 'dirtkb_64hv', 'trainground1', 'des_dirt2stones', 'sjmscorclawn', 'scumtiles3_lae', 'backalley1_lae', 'desertgravelgrassroad' , 'sw_sandgrass', 'desclifftypebsmix', 'desertgravelgrassroad', 'sw_grassb01', 'sw_crops', 'cos_hiwayins_256', 'cos_hiwayout_256', 'hiwayoutside_256', 'hiwaygravel1_256', 'hiwayinside2_256', 'bow_grass_gryard', 'con2sand1b', 'con2sand1a', 'grasslawnfade_256', 'tenniscourt1_256', 'golf_heavygrass', 'golf_fairway3', 'golf_fairway1', 'golf_fairway2', 'golf_greengrass', 'des_dirt1_glfhvy', 'seabed', 'concretedust2_256128', 'des_dirt1_grass', 'vgsroadirt2_256', 'brngrss2stonesb', 'dirtblendlit', 'cw2_mountdirt2grass', 'cw2_mountdirt', 'des_dirt2grass', 'cw2_mountrock', 'desmudgrass', 'desmud', 'des_dirtgrassmixbmp', 'des_dirtgrassmixb', 'des_dirtgrassmixc', 'concretemanky', 'grassdeep256', 'grass_lawn_128hv', 'sw_sandgrass4', 'mountainskree_stones256', 'grasstype4_mudblend', 'grass4dirtytrans', 'bow_church_dirt', 'newcrop3', 'des_ripplsand', 'des_dirt1', 'des_rocky1_dirt1', 'des_scrub1_dirt1', 'des_scrub1', 'desstones_dirt1', 'des_dirt2dedgrass', 'des_dirt2', 'des_dirtgravel', 'des_dirt2blend', 'des_rocky1', 'des_roadedge1', 'des_roadedge2', 'des_panelconc', 'des_oldrunwayblend', 'desertstones256', 'grasstype5', 'grasstype5_dirt', 'grasslong256', 'desgreengrass', 'sw_grass01', 'sw_grass01a', 'yardgrass1', 'grasstype7', 'grassdeadbrn256', 'desgreengrassmix', 'desertgryard256', 'desgrassbrn', 'des_grass2scrub', 'des_scrub1_dirt1b', 'des_scrub1_dirt1a', 'bow_church_grass_gen', 'grifnewtex1x_las', 'grassdead1', 'forestfloor256', 'forestfloorblendded', 'forestfloor256_blenddirt', 'grasstype10', 'grass4_des_dirt2', 'grasstype4_10', 'des_dirt2grgrass', 'grass10_stones256', 'grass10des_dirt2', 'grasstype510', 'grasstype510_10', 'cs_rockdetail', 'forestfloorbranch256', 'ffbranch_mountdirt', 'forestfloorblend', 'desmud2forstfloor', 'forestfloor4', 'grasstype4_staw', 'grassshort2long256', 'grass10forest', 'grass10dirt', 'forestfloor256mudblend', 'ws_patchygravel', 'grasstype4', 'ws_traingravelblend', 'forestfloorgrass', 'des_dirt1grass', 'grasstype5_desdirt', 'des_dirt1', 'des_grass2dirt1', 'blendrock2grgrass', 'sfn_rocktbrn128', 'sfn_rockhole', 'sfn_grass1', 'grass_128hv', 'grassdead1blnd', 'desertgravelgrass256', 'grass4dirty', 'cw2_mountdirt2forest', 'grasstype3', 'grassdry_128hv', 'obhilltex1', 'grasstype4-3', 'cst_rock_coast_sfw', 'newrockgrass_sfw', 'sf_garden3', 'dt_road2grasstype4', 'grassbrn2rockbrn', 'greyground2sand', 'grassgrnbrn256', 'sl_sfngrass01', 'sl_sfngrssdrt01', 'grass', 'desertgryard256grs2', 'grasstype5_4', 'brngrss2stones', 'desgrassbrn_grn', 'desgrasandblend', 'hiwayinside4_256', 'grassdirtblend', 'roadblend:O', 'greyground256', 'forest_rocks', 'sidewgrass4', 'ws_drysand2grass', }, ['img/2.union'] = { 'sw_farmroad01', 'desmudtrail', 'desmudtrail2', 'dirttracksgrass256', 'desgreengrasstrckend', 'cw2_weeroad1', }, ['img/3.union'] = { 'grifnewtex1b', 'des_dirttrackl', 'cw2_mountroad', 'des_dirttrack1r', 'des_dirttrack1', 'des_dirt2track' , 'des_quarryrd', 'des_quarryrdr', 'des_quarryrdl', 'des_dirt2 trackl' , 'des_dirt2trackr', 'tar_1line256hvtodirt', }, ['img/4.union'] = { 'des_oldrunway' , 'ws_runwaytarmac' , 'plaintarmac1' , 'ws_carpark2', }, ['img/5.union'] = { 'sam_camo', 'bonyrd_skin2', 'concretewall22_256', 'corugwall_sandy', }, ['img/UNION.union'] = { 'unnamed', }, ['img/MDD.union'] = { 'telepole2128', 'board64_law', 'metatelepole1', 'cj_w_wood', }, ['img/FROND.union'] = { 'cj_flag2', }, ['img/6.union'] = { 'ws_freeway3blend', 'dt_roadblend', 'kbpavementblend', 'ws_freeway3', 'dt_road', 'roadnew4blend_256', 'craproad1_lae', 'craproad7_lae7', 'snpedtest1', 'cos_hiwaymid_256', 'hiwaymidlle_256', 'roadnew4_512', 'roadnew4_256', 'vegasroad1_256', 'vegasroad2_256', 'vegasroad3_256', 'hiwayend_256', 'sf_road5', 'sf_junction2', 'vegasdirtyroad1_256', 'vegasdirtyroad2_256', 'vegastriproad1_256', 'vgsroadirt1_256', 'vegasdirtyroad3_256', 'sf_tramline2', }, ['img/7.union'] = { 'ws_traintrax1', }, ['img/8.union'] = { 'pavebsandend', 'sidewgrass_fuked', 'sidewgrass3', 'lasunion994', 'kbpavement_test', 'laroad_centre1', 'sjmndukwal2', 'macpath_lae', 'sjmhoodlawn41', 'sidewgrass5', 'sidewgrass1', 'sidewgrass2' , 'pavebsand256', 'vegasdirtypaveblend1', 'dirt64b2', 'ws_sub_pen_conc3', 'concretenewb256', 'ws_sub_pen_conc', 'ws_tunnelwall2', 'vegaspavement2_256', 'blendpavement2b_256', 'hiwayinside5_256', 'dt_road_stoplinea', 'pierplanks02_128', 'vegasdirtypaveblend2', 'vegasdirtypave1_256', 'hiwayinside_256', 'hiwayinsideblend3_256', 'des_pave_trackstart', 'sf_pave6', 'stonesandkb2_128', 'ws_nicepave', 'sidelatino1_lae', 'kbpavement_test', 'craproad5_lae', 'pavebsand256grassblended', 'pavebsand256', ':Oroad01_law', }, ['img/9.union'] = { 'newpavement', 'dockpave_256', 'pavea256', }, ['img/10.union'] = { 'sjmhoodlawn41', 'plaintarmac1', }, ['img/11.union'] = { 'sw_stonesgrass', 'stones256', 'grassbrn2rockbrng' , 'ws_traingravel', ':Obrnclifftop', ':Obrncliffbtmbmp', 'redclifftop256', 'redcliffroof_la', 'hllblf2_lae', }, ['img/12.union'] = { --'rocktbrn128blndlit', 'lasclifface', 'rocktbrn128', 'cs_rockdetail2', 'cw2_mountdirtscree', 'sw_rockgrassb1', 'sw_rockgrass1' , 'des_redrock1', 'rocktbrn128blnd', 'des_redrock2', 'sw_traingravelb1', }, ['img/13.union'] = { 'sw_sand', 'sandstonemixb', 'sandnew_law', 'ws_drysand', 'ws_wetdryblendsand', 'ws_wetsand', 'desertgravel256', }, ['img/14.union'] = { 'tar_venturasjoin', 'crossing_law', 'snpdwargrn1', 'tar_1line256hvblend', 'roaddgrassblnd', 'tar_1line256hvlightsand', 'tar_1line256hvgtravel', 'tar_1line256hvblend2', 'tar_1line256hvblenddrtdot', 'tar_freewyleft', 'tar_1line256hv', 'des_1line256', 'des_1linetar', 'tar_1linefreewy', 'tar_lineslipway', 'des_1lineend', 'sf_junction3', 'sf_junction5', 'tar_1line256hvblenddrt', 'tar_freewyright', }, ['img/16.union'] = { 'gras07si', 'kb_ivy2_256', }, ['img/17.union'] = { -- дерево 'bcorya0', 'sm_bark_light', 'gen_log', 'bpiced1', 'bpinud2', 'sm_redwood_bark', 'bchamae', 'bzelka1', 'bgleda0', 'oakbark64', 'veg_bevtreebase', 'sm_josh_bark', 'bfraxa1', 'bthuja1', }, ['img/18.union'] = { 'fancy_slab128', 'coasty_bit4_sfe', 'stoneclad1', 'taxi_256', 'offwhitebrix', 'des_ranchwall1', 'ws_oldpaintedyello', 'ws_oldpaintedyello_b' , 'vgs_shopwall01_128', 'block2_high', 'sea_wall_temp', 'block', 'concretebigb256128', 'sw_tunnel01', 'sw_tunnel02bmp', 'sw_tunnel01lod', 'stormdrain3_nt', 'brick', 'carparkwall12_256', 'stormdrain1_nt', 'macbrij2_lae', 'rufwaldock1', 'stormdrain3_nt', 'stormdrain2_nt', 'laroad_offroad1', 'gb_nastybar20', 'ws_freeway2', 'ws_freeway1', 'wallgreyred128', 'stormdrain6', 'ws_coppersheet2', 'ws_goldengate2', 'ws_goldengate5b', 'stormdrain5_nt', 'sw_wallbrick_06', 'lasdockbar', 'cj_white_wall2', 'upt_conc floorclean', 'craproad3_lae', 'bow_warehousewall', 'macbrij4_lae', 'forumstand1_lae', 'block2_low', 'block2', 'woodsuport1_128' , 'woodsuport2_128', }, ['img/19.union'] = { 'sfncn_rockgrass3', }, ['img/20.union'] = { 'vgs_rockmid1a', 'vgs_rockbot1a', 'rocktq128_forestblend', 'rocktq128', 'rock_country128', 'rocktq128_dirt', 'rocktq128blender', 'rocktq128_grass4blend', 'sw_stones', 'des_redrockmid', 'sm_rock2_desert', 'des_redrockbot', 'des_yelrock', 'des_dirt2gygrass', 'rocktb128', 'greyrockbig' , }, ['img/21.union'] = { --'txgrass0_1', 'sm_des_bush2', 'sm_des_bush3', 'sm_des_bush1', }, ['img/22.union'] = { --Листя 'newtreeleaves128', 'newtreed256', 'tree19mi', 'sprucbr', 'elm_treegrn4' , 'locustbra', 'oakb', 'oak2b', 'trunk3', 'elmdead', 'sm_pinetreebit', 'oakleaf1', 'oakleaf2', 'elm_treegrn2', 'hazelbranch', 'hazelbrnch', 'pinebrnch1', 'ashbrnch', 'cedarwee', 'cedarbare', 'elmtreered', 'elm_treegrn', 'weeelm', }, ['img/23.union'] = { 'des_dirttrackx', }, ['img/24.union'] = { 'ws_oldpainted2', 'ws_goldengate5bnoalpha', 'dish_roundbit_a', 'ws_goldengate5', }, ['img/25.union'] = { 'telewireslong2', 'telewireslong', }, --Земля ['img/26.union'] = { 'stones256128', 'trainground2', 'newgrnd1brn_128', 'sw_dirt01', 'ws_rotten_concrete1', 'des_crackeddirt1', 'redstones01_256', }, --Брукывка ['img/27.union'] = { 'indund_64', 'brickred2', 'brickred', 'sm_conc_hatch', 'grass_concpath_128hv', 'tilered', 'd0acbe76', }, --Битон земля ['img/28.union'] = { 'ws_carparknew2', 'ws_carparknew1', 'ws_carparknew2a', 'lasjmslumwall', 'bow_abattoir_conc2', 'ws_sub_pen_conc2', 'carpark_128', 'parking2plain', 'parking2', 'heliconcrete', 'hseconcblend1_256', 'ws_carparknew2b', 'dustyconcrete', 'concretedust2_line', 'des_dustconc', 'drvin_ground1', 'grass_path_law', 'ws_airpt_concrete', }, --Криша ['img/29.union'] = { 'sanpedock5', 'fastfood1_lae', 'shingles3', 'des_oldtinroof', 'sjmscruffhut4', 'sw_cabinroof', 'sw_corrugtile', 'sw_slate01', 'ws_corr_metal3', 'ws_corr_metal2', 'acrooftop1256', 'corr_roof1', 'des_shingles', 'des_ghotwood1', 'genroof02_128', 'ws_corr_2_plain', 'roof01l256', 'browntin1', 'vgspawnroof02_128', 'shingles5', 'rooftiles1', 'hospunder_law', 'shingles2', 'woodroof01_128', 'rooftiles2', 'trail_wall1', 'corrroof_64hv', }, --Метал ['img/30.union'] = { 'banding9_64hv', 'redmetal', 'des_bytower1', 'metal1_128', 'bluemetal', 'des_facmetalsoild', 'sm_quarry_crusher1', 'lampost_16clr', 'lamppost', 'cj_lamppost1', 'lamppost2', 'cj_sheetmetal', 'a51_blastdoor', 'ws_greymetal', 'drvin_back', 'drvin_panel', 'iron', 'des_rails1', }, --Шифер ['img/31.union'] = { 'des_sherrifwall1', 'a51_vent1', 'block2bb', 'newall11-1', 'airportmetalwall256', 'dirtyledge_law', 'ws_corrugated1', 'ws_corrugated2', 'corrugated5_64hv', 'corugwall2-1', 'bluemetal02', 'sanpedock1', 'ws_airportwin3', 'ws_airportwall2', 'ws_whitewall2_top', 'coasty_fencet_sfe', 'crencouwall1', 'woodenpanels256', 'hilcouwall2', 'woodwalllight2256', }, --Дерево стыни ['img/32.union'] = { 'des_redslats' , 'des_motelwall5', 'sw_barnwood1', 'gb_nastybar08', 'des_woodfence1', 'des_bywall2', 'des_bywall1', 'boardwalk_la', 'des_greyslats', 'darkplanks1', 'ws_vic_wood1', 'sw_barnwoodblu', 'des_motelwall4', 'corugwall1', 'cratetop128', 'ws_green_wall1', 'des_greyboards', 'trail_side1', 'trail_wall2', 'des_ntwnwall1', }, --Битон стыни ['img/33.union'] = { 'latranswall1', 'latranswall2', 'newall4-4', 'puttywall1', 'compcouwall1', 'ws_sandstone1', 'trail_wall3', 'ws_rottenwall', 'sanpedock96', 'ws_airportwall1', 'ws_whitewall2_bottom', 'yellowall_la', 'corugwallnew6_128', 'bluapartwall1_256', 'des_brick1', 'des_roswin4', 'des_adobewall2', 'dockwall1', 'conc_wall2_128h', 'comptwall10', }, --Кровь ['img/34.union'] = { 'bloodpool_64', }, --Ефекти ['img/afterburner.union'] = { 'afterburner',}, ['img/ashes.union'] = { 'ashes',}, ['img/ashes2.union'] = { 'ashes2',}, ['img/beam.union'] = { 'beam',}, ['img/beamcorona.union'] = { 'beamcorona',}, ['img/beastie.union'] = { 'beastie',}, ['img/Bgush1.union'] = { 'Bgush1',}, ['img/Bgush2.union'] = { 'Bgush2',}, ['img/Bgush3.union'] = { 'Bgush3',}, ['img/Bgush4.union'] = { 'Bgush4',}, ['img/blaze1.union'] = { 'blaze1',}, ['img/blaze2.union'] = { 'blaze2',}, ['img/blaze3.union'] = { 'blaze3',}, ['img/blaze4.union'] = { 'blaze4',}, ['img/blood1.union'] = { 'blood1',}, ['img/blood2.union'] = { 'blood2',}, ['img/blood3.union'] = { 'blood3',}, ['img/blood4.union'] = { 'blood4',}, ['img/BloodCloud.union'] = { 'BloodCloud',}, ['img/blooddrop1.union'] = { 'blooddrop1',}, ['img/blooddrop2.union'] = { 'blooddrop2',}, ['img/blooddrop3.union'] = { 'blooddrop3',}, ['img/blooddrop4.union'] = { 'blooddrop4',}, ['img/BloodRayne.union'] = { 'BloodRayne',}, ['img/BloodSplash.union'] = { 'BloodSplash',}, ['img/Bnitro.union'] = { 'Bnitro',}, ['img/boatsplash.union'] = { 'boatsplash',}, ['img/boatwake1.union'] = { 'boatwake1',}, ['img/bsplat1.union'] = { 'bsplat1',}, ['img/bsplat2.union'] = { 'bsplat2',}, ['img/bsplat3.union'] = { 'bsplat3',}, ['img/bsplat4.union'] = { 'bsplat4',}, ['img/bsplat5.union'] = { 'bsplat5',}, ['img/bubbles.union'] = { 'bubbles',}, ['img/burn1.union'] = { 'burn1',}, ['img/burn2.union'] = { 'burn2',}, ['img/burn3.union'] = { 'burn3',}, ['img/burn4.union'] = { 'burn4',}, ['img/butterfly1.union'] = { 'butterfly1',}, ['img/butterfly2.union'] = { 'butterfly2',}, ['img/butterfly3.union'] = { 'butterfly3',}, ['img/By.union'] = { 'By',}, ['img/cardebris1.union'] = { 'cardebris1',}, ['img/cardebris2.union'] = { 'cardebris2',}, ['img/cardebris3.union'] = { 'cardebris3',}, ['img/cardebris4.union'] = { 'cardebris4',}, ['img/cardebris5.union'] = { 'cardebris5',}, ['img/cardebris_01.union'] = { 'cardebris_01',}, ['img/cardebris_02.union'] = { 'cardebris_02',}, ['img/cardebris_03.union'] = { 'cardebris_03',}, ['img/cardebris_04.union'] = { 'cardebris_04',}, ['img/cardebris_05.union'] = { 'cardebris_05',}, ['img/carsplash_02.union'] = { 'carsplash_02',}, ['img/cement.union'] = { 'cement',}, ['img/cloudmasked.union'] = { 'cloudmasked',}, ['img/coronaringa.union'] = { 'coronaringa',}, ['img/Debris1.union'] = { 'Debris1',}, ['img/Debris2.union'] = { 'Debris2',}, ['img/Debris3.union'] = { 'Debris3',}, ['img/DebrisGaEX.union'] = { 'DebrisGaEX',}, ['img/dirt1.union'] = { 'dirt1',}, ['img/dirt2.union'] = { 'dirt2',}, ['img/dragon.union'] = { 'dragon',}, ['img/drift1.union'] = { 'drift1',}, ['img/drift2.union'] = { 'drift2',}, ['img/drift3.union'] = { 'drift3',}, ['img/drift4.union'] = { 'drift4',}, ['img/driftb1.union'] = { 'driftb1',}, ['img/driftb2.union'] = { 'driftb2',}, ['img/driftb3.union'] = { 'driftb3',}, ['img/driftb4.union'] = { 'driftb4',}, ['img/Drop1.union'] = { 'Drop1',}, ['img/Drop2.union'] = { 'Drop2',}, ['img/electric1.union'] = { 'electric1',}, ['img/electric2.union'] = { 'electric2',}, ['img/electric3.union'] = { 'electric3',}, ['img/electric4.union'] = { 'electric4',}, ['img/electric5.union'] = { 'electric5',}, ['img/electric6.union'] = { 'electric6',}, ['img/electric7.union'] = { 'electric7',}, ['img/electric8.union'] = { 'electric8',}, ['img/Fdebris1.union'] = { 'Fdebris1',}, ['img/Fdebris2.union'] = { 'Fdebris2',}, ['img/Fdebris3.union'] = { 'Fdebris3',}, ['img/Fdebris4.union'] = { 'Fdebris4',}, ['img/feather.union'] = { 'feather',}, ['img/fireball1.union'] = { 'fireball1',}, ['img/fireball10.union'] = { 'fireball10',}, ['img/fireball2.union'] = { 'fireball2',}, ['img/fireball3.union'] = { 'fireball3',}, ['img/fireball4.union'] = { 'fireball4',}, ['img/fireball5.union'] = { 'fireball5',}, ['img/fireball6.union'] = { 'fireball6',}, ['img/fireball7.union'] = { 'fireball7',}, ['img/fireball8.union'] = { 'fireball8',}, ['img/fireball9.union'] = { 'fireball9',}, ['img/FireEX.union'] = { 'FireEX',}, ['img/fireball2.union'] = { 'wjet6',}, -- --['img/FireEX.union'] = { 'bullethitsmoke',}, -- ['img/FireFlame.union'] = { 'FireFlame',}, ['img/FireFlame3.union'] = { 'FireFlame3',}, ['img/flake1.union'] = { 'flake1',}, ['img/flake2.union'] = { 'flake2',}, ['img/flame1.union'] = { 'flame1',}, ['img/flame2.union'] = { 'flame2',}, ['img/flame3.union'] = { 'flame3',}, ['img/flame4.union'] = { 'flame4',}, ['img/flamethrower.union'] = { 'flamethrower',}, ['img/flash1.union'] = { 'flash1',}, ['img/flash2.union'] = { 'flash2',}, ['img/flash3.union'] = { 'flash3',}, ['img/flash4.union'] = { 'flash4',}, ['img/fly1.union'] = { 'fly1',}, ['img/fly2.union'] = { 'fly2',}, ['img/fly3.union'] = { 'fly3',}, ['img/Fnitro.union'] = { 'Fnitro',}, ['img/Foliage.union'] = { 'Foliage',}, ['img/Function-X-.union'] = { 'Function-X-',}, ['img/gameleaf01_64.union'] = { 'gameleaf01_64',}, ['img/gensplash.union'] = { 'gensplash',}, ['img/glassmall.union'] = { 'glassmall',}, ['img/glowlight.union'] = { 'glowlight',}, ['img/gore1.union'] = { 'gore1',}, ['img/gore2.union'] = { 'gore2',}, ['img/gore3.union'] = { 'gore3',}, ['img/gore4.union'] = { 'gore4',}, ['img/gum.union'] = { 'gum',}, ['img/GunFlash.union'] = { 'GunFlash',}, ['img/GunFlash1.union'] = { 'GunFlash1',}, ['img/GunFlash2.union'] = { 'GunFlash2',}, ['img/GunFlash3.union'] = { 'GunFlash3',}, ['img/GunFlash4.union'] = { 'GunFlash4',}, ['img/gunshell.union'] = { 'gunshell',}, ['img/headshot1.union'] = { 'headshot1',}, ['img/headshot2.union'] = { 'headshot2',}, ['img/headshot3.union'] = { 'headshot3',}, ['img/headshot4.union'] = { 'headshot4',}, ['img/headshot5.union'] = { 'headshot5',}, ['img/inferno1.union'] = { 'inferno1',}, ['img/inferno2.union'] = { 'inferno2',}, ['img/inferno3.union'] = { 'inferno3',}, ['img/inferno4.union'] = { 'inferno4',}, ['img/inferno5.union'] = { 'inferno5',}, ['img/inflame1.union'] = { 'inflame1',}, ['img/inflame2.union'] = { 'inflame2',}, ['img/inflame3.union'] = { 'inflame3',}, ['img/inflame4.union'] = { 'inflame4',}, ['img/inflamed1.union'] = { 'inflamed1',}, ['img/inflamed2.union'] = { 'inflamed2',}, ['img/inflamed3.union'] = { 'inflamed3',}, ['img/inflamed4.union'] = { 'inflamed4',}, ['img/laser.union'] = { 'laser',}, ['img/leaf1.union'] = { 'leaf1',}, ['img/leaf2.union'] = { 'leaf2',}, ['img/light1.union'] = { 'light1',}, ['img/light2.union'] = { 'light2',}, ['img/light3.union'] = { 'light3',}, ['img/light4.union'] = { 'light4',}, ['img/light5.union'] = { 'light5',}, ['img/light6.union'] = { 'light6',}, ['img/lightning1.union'] = { 'lightning1',}, ['img/lightning2.union'] = { 'lightning2',}, ['img/lightning3.union'] = { 'lightning3',}, ['img/lightning4.union'] = { 'lightning4',}, ['img/lightning5.union'] = { 'lightning5',}, ['img/molotov1.union'] = { 'molotov1',}, ['img/molotov2.union'] = { 'molotov2',}, ['img/molotov3.union'] = { 'molotov3',}, ['img/molotov4.union'] = { 'molotov4',}, ['img/muzzle1.union'] = { 'muzzle1',}, ['img/muzzle2.union'] = { 'muzzle2',}, ['img/muzzle3.union'] = { 'muzzle3',}, ['img/muzzle4.union'] = { 'muzzle4',}, ['img/neon.union'] = { 'neon',}, ['img/NewFx1.union'] = { 'NewFx1',}, ['img/NewFx2.union'] = { 'NewFx2',}, ['img/NewFx3.union'] = { 'NewFx3',}, ['img/newspaper.union'] = { 'newspaper',}, ['img/Overdoseeffects.union'] = { 'Overdoseeffects',}, ['img/paper1.union'] = { 'paper1',}, ['img/paper2.union'] = { 'paper2',}, ['img/paper3.union'] = { 'paper3',}, ['img/paper4.union'] = { 'paper4',}, ['img/Pnitro.union'] = { 'Pnitro',}, ['img/pointlight.union'] = { 'pointlight',}, ['img/puke.union'] = { 'puke',}, ['img/railex.union'] = { 'railex',}, ['img/rain1.union'] = { 'rain1',}, ['img/rain2.union'] = { 'rain2',}, ['img/rain3.union'] = { 'rain3',}, ['img/rain4.union'] = { 'rain4',}, ['img/realex1.union'] = { 'realex1',}, ['img/realex2.union'] = { 'realex2',}, ['img/realex3.union'] = { 'realex3',}, ['img/realex4.union'] = { 'realex4',}, ['img/realexb1.union'] = { 'realexb1',}, ['img/realexb2.union'] = { 'realexb2',}, ['img/realexb3.union'] = { 'realexb3',}, ['img/realexb4.union'] = { 'realexb4',}, ['img/realfire1.union'] = { 'realfire1',}, ['img/realfire2.union'] = { 'realfire2',}, ['img/realfire3.union'] = { 'realfire3',}, ['img/realfire4.union'] = { 'realfire4',}, ['img/rope1.union'] = { 'rope1',}, ['img/rope2.union'] = { 'rope2',}, ['img/snow1.union'] = { 'snow1',}, ['img/snow2.union'] = { 'snow2',}, ['img/snow3.union'] = { 'snow3',}, ['img/sonic1.union'] = { 'sonic1',}, ['img/sonic2.union'] = { 'sonic2',}, ['img/sparkdebris1.union'] = { 'sparkdebris1',}, ['img/sparkdebris2.union'] = { 'sparkdebris2',}, ['img/sparkdebris3.union'] = { 'sparkdebris3',}, ['img/sparkdebris4.union'] = { 'sparkdebris4',}, ['img/Sparks.union'] = { 'Sparks',}, ['img/Sparks2.union'] = { 'Sparks2',}, ['img/Sparks3.union'] = { 'Sparks3',}, ['img/Sparks4.union'] = { 'Sparks4',}, ['img/Sparks5.union'] = { 'Sparks5',}, ['img/Sparks6.union'] = { 'Sparks6',}, ['img/Sparks7.union'] = { 'Sparks7',}, ['img/SparksFlash.union'] = { 'SparksFlash',}, --['img/sphere.union'] = { 'sphere',}, ['img/sphere_CJ.union'] = { 'sphere_CJ',}, ['img/splash1.union'] = { 'splash1',}, ['img/splash2.union'] = { 'splash2',}, ['img/splash3.union'] = { 'splash3',}, ['img/splash4.union'] = { 'splash4',}, ['img/splash5.union'] = { 'splash5',}, ['img/splash6.union'] = { 'splash6',}, ['img/splash_up.union'] = { 'splash_up',}, ['img/splash_up1.union'] = { 'splash_up1',}, ['img/splash_up2.union'] = { 'splash_up2',}, ['img/splatter1.union'] = { 'splatter1',}, ['img/splatter2.union'] = { 'splatter2',}, ['img/splatter3.union'] = { 'splatter3',}, ['img/splatter4.union'] = { 'splatter4',}, ['img/water1.union'] = { 'water1',}, ['img/water2.union'] = { 'water2',}, ['img/water3.union'] = { 'water3',}, ['img/water4.union'] = { 'water4',}, ['img/waterripple1.union'] = { 'waterripple1',}, ['img/waterripple2.union'] = { 'waterripple2',}, ['img/waterripple3.union'] = { 'waterripple3',}, ['img/waterripple4.union'] = { 'waterripple4',}, ['img/waterspark.union'] = { 'waterspark',}, ['img/waterspark_16.union'] = { 'waterspark_16',}, ['img/wgush1.union'] = { 'wgush1',}, ['img/wjet2.union'] = { 'wjet2',}, ['img/wjet4.union'] = { 'wjet4',}, ['img/wjet6.union'] = { 'wjet6',}, ['img/wood1.union'] = { 'wood1',}, ['img/wood2.union'] = { 'wood2',}, ['img/wood3.union'] = { 'wood3',}, ['img/wood4.union'] = { 'wood4',}, ['img/fx2/carfx1.union'] = { 'carfx1',}, ['img/fx2/cloud1.union'] = { 'cloud1',}, ['img/fx2/cloudhigh.union'] = { 'cloudhigh',}, ['img/fx2/cloudmasked.union'] = { 'cloudmasked',}, ['img/fx2/coronaheadlightline.union'] = { 'coronaheadlightline',}, ['img/fx2/coronamoon.union'] = { 'coronamoon',}, ['img/fx2/coronareflect.union'] = { 'coronareflect',}, ['img/fx2/coronaringb.union'] = { 'coronaringb',}, ['img/fx2/coronastar.union'] = { 'coronastar',}, ['img/fx2/finishFlag.union'] = { 'finishFlag',}, ['img/fx2/handman.union'] = { 'handman',}, ['img/fx2/headlight.union'] = { 'headlight',}, ['img/fx2/headlight1.union'] = { 'headlight1',}, ['img/fx2/lamp_shad_64.union'] = { 'lamp_shad_64',}, ['img/fx2/lockon.union'] = { 'lockon',}, ['img/fx2/lockonFire.union'] = { 'lockonFire',}, ['img/fx2/lunar.union'] = { 'lunar',}, ['img/fx2/particleskid.union'] = { 'particleskid',}, ['img/fx2/rainfx.union'] = { 'rainfx',}, ['img/fx2/roadsignfont.union'] = { 'roadsignfont',}, ['img/fx2/seabd32.union'] = { 'seabd32',}, ['img/fx2/shad_bike.union'] = { 'shad_bike',}, ['img/fx2/shad_car.union'] = { 'shad_car',}, ['img/fx2/shad_exp.union'] = { 'shad_exp',}, --['img/fx2/shad_heli.union'] = { 'shad_heli',}, ['img/fx2/shad_ped.union'] = { 'shad_ped',}, ['img/fx2/shad_rcbaron.union'] = { 'shad_rcbaron',}, ['img/fx2/Sky.union'] = { 'Sky',}, ['img/fx2/Sky2.union'] = { 'Sky2',}, ['img/fx2/Sky3.union'] = { 'Sky3',}, ['img/fx2/Skysnow.union'] = { 'Skysnow',}, ['img/fx2/target256.union'] = { 'target256',}, ['img/fx2/txgrassbig0.union'] = { 'txgrassbig0',}, ['img/fx2/txgrassbig1.union'] = { 'txgrassbig1',}, ['img/fx2/waterclear256.union'] = { 'waterclear256',}, ['img/fx2/waterwake.union'] = { 'waterwake',}, ['img/fx2/white.union'] = { 'white',}, ['img/fx2/wincrack_32.union'] = { 'wincrack_32',}, ['1.png'] = { 'sphere',}, } function loadShaders () for path,texstures in pairs (shaderMap) do local shader = dxCreateShader('shader.fx') table.insert(shaderList, shader) local terrain = dxCreateTexture(path) dxSetShaderValue(shader, 'gTexture', terrain) for i,txd in ipairs (texstures) do engineRemoveShaderFromWorldTexture(nightShader, txd) engineApplyShaderToWorldTexture(shader,txd) end end end addEventHandler( "onClientResourceStart", resourceRoot, loadShaders )
-
Please help me, at this point the shader fails totally to all players, and it doesnt look to good. Please guys ;-;
-
Hi guys, i need some help with a script that i think is a problem on my server. I mean i need it but there are always lag spikes and at a certain point a freeze. This happens to all players and i think it is because of the shader script. ------------------------------------- --Resource: Screen FX v0.05 -- --Author: Ren712 -- ------------------------------------- local scx, scy = guiGetScreenSize() local orderPriority = "-1.8" Settings = {} Settings.var = {} fxScreenEnable = false ---------------------------------------------------------------------------------------------------------------------------- -- Standard settings ---------------------------------------------------------------------------------------------------------------------------- function fxScreenSettings() v = Settings.var v.effectType = {} --Color v.effectType[1] = {} v.effectType[1].enabled = false v.effectType[1].fadeSpeed = 0.015 v.effectType[1].streng = 0 v.effectType[1].maxStreng = 1 v.effectType[1].speed = 0.6 v.effectType[1].choke = 1 --Shake v.effectType[2] = {} v.effectType[2].enabled = false v.effectType[2].fadeSpeed = 0.015 v.effectType[2].streng = 0 v.effectType[2].maxStreng = 1 v.effectType[2].speed = 8.0 --Wobble v.effectType[3] = {} v.effectType[3].enabled = false v.effectType[3].fadeSpeed = 0.015 v.effectType[3].streng = 0 v.effectType[3].maxStreng = 1 v.effectType[3].speed = 0.1 v.effectType[3].size = 0.005 v.effectType[3].density = 50 --Esotropia v.effectType[4] = {} v.effectType[4].enabled = false v.effectType[4].fadeSpeed = 0.015 v.effectType[4].streng = 0 v.effectType[4].maxStreng = 1 v.effectType[4].speed = 0.2 v.effectType[4].intens = 0.1 v.effectType[4].blur = 0.5 v.effectType[4].choke = 0.85 --Global v.maxAlpha = 255 end ---------------------------------------------------------------------------------------------------------------------------- -- onClientResourceStart ---------------------------------------------------------------------------------------------------------------------------- function enableScreenEffects() if fxScreenEnable then return true end -- Create things colorTex = dxCreateTexture("tex/color.png") myScreenSource = dxCreateScreenSource( scx, scy) esotropiaHShader = dxCreateShader( "fx/esotropiaH.fx" ) esotropiaVShader = dxCreateShader( "fx/esotropiaV.fx" ) colorsShader = dxCreateShader( "fx/colors.fx" ) wobbleShader = dxCreateShader( "fx/wobble.fx" ) shakeShader = dxCreateShader( "fx/shake.fx" ) -- Check everything is ok -- Get list of all elements used effectParts = { colorTex, myScreenSource, esotropiaHShader, esotropiaVShader, colorsShader, wobbleShader, shakeShader, } -- Check list of all elements used bAllValid = true for _,part in ipairs(effectParts) do bAllValid = part and bAllValid end if not bAllValid then outputChatBox( "Screen FX: The resource failed to start.", 255, 0, 0 ) return false end fxScreenEnable = true fxScreenSettings() fxScreenTimer = setTimer ( function ( ) changeEffectIntensity() end, 100, 0 ) outputDebugString('Screen FX: Effects started.') return true end ---------------------------------------------------------------------------------------------------------------------------- -- Switch effect off ---------------------------------------------------------------------------------------------------------------------------- function disableScreenEffects() if not fxScreenEnable then return end -- Destroy all shaders for _,part in ipairs(effectParts) do if part then destroyElement( part ) end end effectParts = {} bAllValid = false RTPool.clear() killTimer( fxScreenTimer ) fxScreenTimer = nil -- Flag effect as stopped fxScreenEnable = false outputDebugString('Screen FX: Effects stopped.') return true end function changeEffectIntensity() local v = Settings.var for i,this in ipairs(v.effectType) do v.effectType[i].streng = effectFade( v.effectType[i].enabled, v.effectType[i].streng, v.effectType[i].fadeSpeed, v.effectType[i].maxStreng ) end end function effectFade( effectOn, value, eSpeed, eMax ) local efVal = value if (( effectOn == true ) and (efVal < eMax )) then efVal = efVal + ( eSpeed ) end if (( effectOn == false ) and (efVal > 0 )) then efVal = efVal - ( eSpeed ) end if efVal <= 0 then efVal = 0 end if efVal >= eMax then efVal = eMax end return efVal end ---------------------------------------------------------------------------------------------------------------------------- -- onClientHUDRender ---------------------------------------------------------------------------------------------------------------------------- addEventHandler( "onClientHUDRender", root, function() if not fxScreenEnable or not bAllValid or not Settings.var then return end local v = Settings.var -- Reset render target pool RTPool.frameStart() -- Update screen dxUpdateScreenSource( myScreenSource, true ) -- Start with screen local current = myScreenSource -- Apply all the effects, bouncing from one render target to another if v.effectType[4].streng > 0 then current = applyEsotropiaH( current, v.effectType[4].maxStreng * v.effectType[4].blur, 0, v.effectType[4].intens / 100, v.effectType[4].speed, v.effectType[4].choke, v.effectType[4].streng ) current = applyEsotropiaV( current, v.effectType[4].maxStreng * v.effectType[4].blur, v.effectType[4].intens, 0, v.effectType[4].speed, v.effectType[4].choke, v.effectType[4].streng ) end if v.effectType[3].streng > 0 then current = applyWobble( current, v.effectType[3].maxStreng * v.effectType[3].speed, v.effectType[3].size, v.effectType[3].density, v.effectType[3].streng ) end if v.effectType[1].streng > 0 then current = applyColors( current, colorTex, v.effectType[1].speed, v.effectType[1].choke, v.effectType[1].streng ) end if v.effectType[2].streng > 0 then current = applyShake( current, v.effectType[2].speed, v.effectType[2].maxStreng, v.effectType[2].streng ) end -- When we're done, turn the render target back to default dxSetRenderTarget() local scrAlpha = math.max( v.effectType[4].streng, v.effectType[3].streng, v.effectType[1].streng, v.effectType[2].streng ) * 255 local col = tocolor( 255, 255, 255, scrAlpha * v.maxAlpha/255 ) if current and scrAlpha > 0 then dxDrawImage( 0, 0, scx, scy, current, 0, 0, 0, col ) end end ,true ,"low" .. orderPriority ) ---------------------------------------------------------------------------------------------------------------------------- -- Apply the different stages ---------------------------------------------------------------------------------------------------------------------------- function applyShake( Src, wSpeed, wStrenght, strenght ) if not Src then return nil end local mx,my = dxGetMaterialSize( Src ) local newRT = RTPool.GetUnused( mx, my ) if not newRT then return nil end dxSetRenderTarget( newRT, true ) dxSetShaderValue( shakeShader, "TEX0", Src ) dxSetShaderValue( shakeShader, "TEX0SIZE", mx,my ) dxSetShaderValue( shakeShader, "wSpeed", wSpeed ) dxSetShaderValue( shakeShader, "wStrenght", wStrenght * 0.1, wStrenght * 0.1 ) dxSetShaderValue( shakeShader, "strenght", strenght ) dxDrawImage( 0, 0, mx, my, shakeShader ) return newRT end function applyWobble( Src, wSpeed, wSize, wDensity, strenght ) if not Src then return nil end local mx,my = dxGetMaterialSize( Src ) local newRT = RTPool.GetUnused( mx, my ) if not newRT then return nil end dxSetRenderTarget( newRT, true ) dxSetShaderValue( wobbleShader, "TEX0", Src ) dxSetShaderValue( wobbleShader, "TEX0SIZE", mx,my ) dxSetShaderValue( wobbleShader, "wSpeed", wSpeed ) dxSetShaderValue( wobbleShader, "wSize", wSize ) dxSetShaderValue( wobbleShader, "wDensity", wDensity ) dxSetShaderValue( wobbleShader, "strenght", strenght, strenght ) dxDrawImage( 0, 0, mx, my, wobbleShader ) return newRT end function applyColors( Src, Col, pSpeed, pChoke, strenght) if not Src then return nil end local mx,my = dxGetMaterialSize( Src ) local newRT = RTPool.GetUnused( mx, my ) if not newRT then return nil end dxSetRenderTarget( newRT, true ) dxSetShaderValue( colorsShader, "TEX0", Src ) dxSetShaderValue( colorsShader, "TEX0SIZE", mx,my ) dxSetShaderValue( colorsShader, "TEX1", Col ) dxSetShaderValue( colorsShader, "pendulumSpeed", pSpeed ) dxSetShaderValue( colorsShader, "pendulumChoke", pChoke ) dxSetShaderValue( colorsShader, "strenght", strenght ) dxDrawImage( 0, 0, mx, my, colorsShader ) return newRT end function applyEsotropiaH( Src, blur, propX, propY, pSpeed, pChoke, strenght ) if not Src then return nil end local mx,my = dxGetMaterialSize( Src ) local newRT = RTPool.GetUnused( mx, my ) if not newRT then return nil end dxSetRenderTarget( newRT, true ) local prop = { propX, propY } dxSetShaderValue( esotropiaHShader, "TEX0", Src ) dxSetShaderValue( esotropiaHShader, "TEX0SIZE", mx,my ) dxSetShaderValue( esotropiaHShader, "pendulumSpeed", pSpeed ) dxSetShaderValue( esotropiaHShader, "pendulumChoke", pChoke ) dxSetShaderValue( esotropiaHShader, "Prop", prop ) dxSetShaderValue( esotropiaHShader, "sBlur", blur ) dxSetShaderValue( esotropiaHShader, "strenght", strenght ) dxDrawImage( 0, 0, mx, my, esotropiaHShader ) return newRT end function applyEsotropiaV( Src, blur, propX, propY, pSpeed, pChoke, strenght ) if not Src then return nil end local mx,my = dxGetMaterialSize( Src ) local newRT = RTPool.GetUnused( mx, my ) if not newRT then return nil end dxSetRenderTarget( newRT, true ) local prop = { propX, propY } dxSetShaderValue( esotropiaVShader, "TEX0", Src ) dxSetShaderValue( esotropiaVShader, "TEX0SIZE", mx,my ) dxSetShaderValue( esotropiaVShader, "pendulumSpeed", pSpeed ) dxSetShaderValue( esotropiaVShader, "pendulumChoke", pChoke ) dxSetShaderValue( esotropiaVShader, "Prop", prop ) dxSetShaderValue( esotropiaVShader, "sBlur", blur ) dxSetShaderValue( esotropiaVShader, "strenght", strenght ) dxDrawImage( 0, 0, mx,my, esotropiaVShader ) return newRT end ---------------------------------------------------------------------------------------------------------------------------- -- Pool of render targets ---------------------------------------------------------------------------------------------------------------------------- RTPool = {} RTPool.list = {} function RTPool.frameStart() for rt,info in pairs(RTPool.list) do info.bInUse = false end end function RTPool.GetUnused( sx, sy ) -- Find unused existing for rt,info in pairs(RTPool.list) do if not info.bInUse and info.sx == sx and info.sy == sy then info.bInUse = true return rt end end -- Add new outputDebugString( "creating new RT " .. tostring(sx) .. " x " .. tostring(sy) ) local rt = dxCreateRenderTarget( sx, sy ) if rt then RTPool.list[rt] = { bInUse = true, sx = sx, sy = sy } end return rt end function RTPool.clear() for rt,info in pairs(RTPool.list) do destroyElement(rt) end RTPool.list = {} end ---------------------------------------------------------------------------------------------------------------------------- -- onClientResourceStart ---------------------------------------------------------------------------------------------------------------------------- addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource()), function() outputDebugString('Screen FX: The resource is started.') enableScreenEffects() disableScreenEffects() end ) Every time i log on the server it says 'Screen FX: The resource failed to start." but the shader is working, but i think it is lagging , and after many crashes, i stop seeing the shader ( and i get two more messages : "Could not create shader. Please use debugscript 3", "Could not create night shader. Please use debugscript 3" ) and i see everything like default, but others are able to see the shader, and i need to restart my pc in order to see it too. Please help me fix it. And here is the file with the debugscript error messages : --By Fanbox local maxDarkness = 0.4 -- [1] = lightest || [0] = darkest 1-- 0.05 2-- 0.1 3-- 0.5 4-- 0.3 5-- 0.4 local speed = 0.0001 -- 0.001 local b = 1 local shaderList = {} local fading = false local clone local nightShader InselMapStart = function() for i1 = 4212, 4222 do removeWorldModel(i1, 10000, 0, 0, 0) end for i2 = 4715, 4717 do removeWorldModel(i2, 10000, 0, 0, 0) end for i3 = 4720, 4725 do removeWorldModel(i3, 10000, 0, 0, 0) end for i4 = 4739, 4752 do removeWorldModel(i4, 10000, 0, 0, 0) end for i5 = 5057, 5059 do removeWorldModel(i5, 10000, 0, 0, 0) end for i6 = 5661, 5665 do removeWorldModel(i6, 10000, 0, 0, 0) end for i7 = 5990, 5992 do removeWorldModel(i7, 10000, 0, 0, 0) end for i8 = 6192, 6196 do removeWorldModel(i8, 10000, 0, 0, 0) end for i9 = 7072, 7097 do removeWorldModel(i9, 10000, 0, 0, 0) end for j1 = 7206, 7208 do removeWorldModel(j1, 10000, 0, 0, 0) end for j2 = 7221, 7226 do removeWorldModel(j2, 10000, 0, 0, 0) end for j3 = 7280, 7280 do removeWorldModel(j3, 10000, 0, 0, 0) end for j4 = 7331, 7333 do removeWorldModel(j4, 10000, 0, 0, 0) end for j5 = 7892, 7892 do removeWorldModel(j5, 10000, 0, 0, 0) end for j6 = 7942, 7944 do removeWorldModel(j6, 10000, 0, 0, 0) end for j7 = 8372, 8372 do removeWorldModel(j7, 10000, 0, 0, 0) end for j8 = 9088, 9089 do removeWorldModel(j8, 10000, 0, 0, 0) end for j9 = 9121, 9129 do removeWorldModel(j9, 10000, 0, 0, 0) end for k1 = 9154, 9159 do removeWorldModel(k1, 10000, 0, 0, 0) end for k2 = 9277, 9283 do removeWorldModel(k2, 10000, 0, 0, 0) end for k3 = 9285, 9286 do removeWorldModel(k3, 10000, 0, 0, 0) end for k4 = 9885, 9886 do removeWorldModel(k4, 10000, 0, 0, 0) end for k5 = 9932, 9934 do removeWorldModel(k5, 10000, 0, 0, 0) end for k6 = 10057, 10058 do removeWorldModel(k6, 10000, 0, 0, 0) end for k7 = 10146, 10147 do removeWorldModel(k7, 10000, 0, 0, 0) end for k8 = 11410, 11412 do removeWorldModel(k8, 10000, 0, 0, 0) end for k9 = 13461, 13461 do removeWorldModel(k9, 10000, 0, 0, 0) end for t1 = 13461, 13461 do removeWorldModel(t1, 10000, 0, 0, 0) end for t2 = 13484, 13485 do removeWorldModel(t2, 10000, 0, 0, 0) end for t3 = 13493, 13493 do removeWorldModel(t3, 10000, 0, 0, 0) end for t4 = 17954, 17957 do removeWorldModel(t4, 10000, 0, 0, 0) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), InselMapStart) local removables = { 'tx*', --'coronastar', --'shad_exp*', 'radar*', '*icon', 'font*', 'lampost_16clr', 'headlight', 'vehiclegeneric256', 'skybox_tex', 'siteM16' } function night_init() if getVersion ().sortable < '1.1.0' then return false end local testShader, tec = dxCreateShader('night.fx') if not testShader then outputChatBox('Could not create night shader. Please use debugscript 3') else nightShader = dxCreateShader('night.fx', 0, 0, false, "all") for c=48,122 do engineApplyShaderToWorldTexture(nightShader, string.format('%c*', c)) end for i,v in pairs(removables) do engineRemoveShaderFromWorldTexture(nightShader, v) end table.insert(shaderList, nightShader) end addEventHandler('onClientHUDRender', root, night_render) nightTimer = setTimer(night_check, 1000, 0) end function night_check() local hours, minutes = getTime() setSkyGradient(65,80,83,65,80,84) setFarClipDistance(200)-----Расстояник до тумана днём setFogDistance(15) if hours >= 5 and hours < 12 then fading = false setSkyGradient(65,80,83,65,80,84) setWeather (9) elseif hours >= 12 and hours < 18 then fading = false setSkyGradient(65,80,83,65,60,64) setWeather (15) elseif hours >= 18 and hours < 21 then fading = false setSkyGradient(65,80,83,55,70,74) setWeather (14) elseif hours >= 21 and hours < 5 then fading = false setSkyGradient(65,80,83,35,40,44) setWeather (12) else fading = true setSkyGradient( 0, 0, 0, 10, 10, 10 ) setFarClipDistance(100)--1000 setFogDistance(35)--100 end end function night_render() local int, dim = getElementInterior(localPlayer), getElementDimension(localPlayer) if fading then if b > maxDarkness then b = b - speed elseif b <= maxDarkness then b = maxDarkness end else if b < 1.0 then b = b + speed elseif b >= 1.0 then b = 1.0 end end for _,shader in ipairs(shaderList) do if int == 0 and dim == 0 then dxSetShaderValue(shader, 'NIGHT', b, b, b) else dxSetShaderValue(shader, 'NIGHT', 1.0, 1.0, 1.0) end end end night_init() local shaderMap = { ['img/1.union'] = { --'metalflooring4', 'forestfloorblendb', 'con2sand1c', 'sjmhoodlawn42b', 'venturas_fwend', 'pavemiddirt_law', 'hiway2sand1a', 'des_dam_conc', 'forestfloor3', 'grasstype4_forestblend', 'forestfloor_sones256', 'cw2_mounttrailblank', 'cw2_mounttrail', 'sw_sandgrass' , 'desertstones256forestmix', 'bow_abpave_gen', 'desgreengrassmix', 'grasstype4blndtomud', 'grasstype4blndtodirt', 'des_dirtgrassmix_grass4', 'grasstype10_4blend', 'rocktq128_forestblend2', 'forestfloor3_forest', 'dirtkb_64hv', 'trainground1', 'des_dirt2stones', 'sjmscorclawn', 'scumtiles3_lae', 'backalley1_lae', 'desertgravelgrassroad' , 'sw_sandgrass', 'desclifftypebsmix', 'desertgravelgrassroad', 'sw_grassb01', 'sw_crops', 'cos_hiwayins_256', 'cos_hiwayout_256', 'hiwayoutside_256', 'hiwaygravel1_256', 'hiwayinside2_256', 'bow_grass_gryard', 'con2sand1b', 'con2sand1a', 'grasslawnfade_256', 'tenniscourt1_256', 'golf_heavygrass', 'golf_fairway3', 'golf_fairway1', 'golf_fairway2', 'golf_greengrass', 'des_dirt1_glfhvy', 'seabed', 'concretedust2_256128', 'des_dirt1_grass', 'vgsroadirt2_256', 'brngrss2stonesb', 'dirtblendlit', 'cw2_mountdirt2grass', 'cw2_mountdirt', 'des_dirt2grass', 'cw2_mountrock', 'desmudgrass', 'desmud', 'des_dirtgrassmixbmp', 'des_dirtgrassmixb', 'des_dirtgrassmixc', 'concretemanky', 'grassdeep256', 'grass_lawn_128hv', 'sw_sandgrass4', 'mountainskree_stones256', 'grasstype4_mudblend', 'grass4dirtytrans', 'bow_church_dirt', 'newcrop3', 'des_ripplsand', 'des_dirt1', 'des_rocky1_dirt1', 'des_scrub1_dirt1', 'des_scrub1', 'desstones_dirt1', 'des_dirt2dedgrass', 'des_dirt2', 'des_dirtgravel', 'des_dirt2blend', 'des_rocky1', 'des_roadedge1', 'des_roadedge2', 'des_panelconc', 'des_oldrunwayblend', 'desertstones256', 'grasstype5', 'grasstype5_dirt', 'grasslong256', 'desgreengrass', 'sw_grass01', 'sw_grass01a', 'yardgrass1', 'grasstype7', 'grassdeadbrn256', 'desgreengrassmix', 'desertgryard256', 'desgrassbrn', 'des_grass2scrub', 'des_scrub1_dirt1b', 'des_scrub1_dirt1a', 'bow_church_grass_gen', 'grifnewtex1x_las', 'grassdead1', 'forestfloor256', 'forestfloorblendded', 'forestfloor256_blenddirt', 'grasstype10', 'grass4_des_dirt2', 'grasstype4_10', 'des_dirt2grgrass', 'grass10_stones256', 'grass10des_dirt2', 'grasstype510', 'grasstype510_10', 'cs_rockdetail', 'forestfloorbranch256', 'ffbranch_mountdirt', 'forestfloorblend', 'desmud2forstfloor', 'forestfloor4', 'grasstype4_staw', 'grassshort2long256', 'grass10forest', 'grass10dirt', 'forestfloor256mudblend', 'ws_patchygravel', 'grasstype4', 'ws_traingravelblend', 'forestfloorgrass', 'des_dirt1grass', 'grasstype5_desdirt', 'des_dirt1', 'des_grass2dirt1', 'blendrock2grgrass', 'sfn_rocktbrn128', 'sfn_rockhole', 'sfn_grass1', 'grass_128hv', 'grassdead1blnd', 'desertgravelgrass256', 'grass4dirty', 'cw2_mountdirt2forest', 'grasstype3', 'grassdry_128hv', 'obhilltex1', 'grasstype4-3', 'cst_rock_coast_sfw', 'newrockgrass_sfw', 'sf_garden3', 'dt_road2grasstype4', 'grassbrn2rockbrn', 'greyground2sand', 'grassgrnbrn256', 'sl_sfngrass01', 'sl_sfngrssdrt01', 'grass', 'desertgryard256grs2', 'grasstype5_4', 'brngrss2stones', 'desgrassbrn_grn', 'desgrasandblend', 'hiwayinside4_256', 'grassdirtblend', 'roadblend:O', 'greyground256', 'forest_rocks', 'sidewgrass4', 'ws_drysand2grass', }, ['img/2.union'] = { 'sw_farmroad01', 'desmudtrail', 'desmudtrail2', 'dirttracksgrass256', 'desgreengrasstrckend', 'cw2_weeroad1', }, ['img/3.union'] = { 'grifnewtex1b', 'des_dirttrackl', 'cw2_mountroad', 'des_dirttrack1r', 'des_dirttrack1', 'des_dirt2track' , 'des_quarryrd', 'des_quarryrdr', 'des_quarryrdl', 'des_dirt2 trackl' , 'des_dirt2trackr', 'tar_1line256hvtodirt', }, ['img/4.union'] = { 'des_oldrunway' , 'ws_runwaytarmac' , 'plaintarmac1' , 'ws_carpark2', }, ['img/5.union'] = { 'sam_camo', 'bonyrd_skin2', 'concretewall22_256', 'corugwall_sandy', }, ['img/UNION.union'] = { 'unnamed', }, ['img/MDD.union'] = { 'telepole2128', 'board64_law', 'metatelepole1', 'cj_w_wood', }, ['img/FROND.union'] = { 'cj_flag2', }, ['img/6.union'] = { 'ws_freeway3blend', 'dt_roadblend', 'kbpavementblend', 'ws_freeway3', 'dt_road', 'roadnew4blend_256', 'craproad1_lae', 'craproad7_lae7', 'snpedtest1', 'cos_hiwaymid_256', 'hiwaymidlle_256', 'roadnew4_512', 'roadnew4_256', 'vegasroad1_256', 'vegasroad2_256', 'vegasroad3_256', 'hiwayend_256', 'sf_road5', 'sf_junction2', 'vegasdirtyroad1_256', 'vegasdirtyroad2_256', 'vegastriproad1_256', 'vgsroadirt1_256', 'vegasdirtyroad3_256', 'sf_tramline2', }, ['img/7.union'] = { 'ws_traintrax1', }, ['img/8.union'] = { 'pavebsandend', 'sidewgrass_fuked', 'sidewgrass3', 'lasunion994', 'kbpavement_test', 'laroad_centre1', 'sjmndukwal2', 'macpath_lae', 'sjmhoodlawn41', 'sidewgrass5', 'sidewgrass1', 'sidewgrass2' , 'pavebsand256', 'vegasdirtypaveblend1', 'dirt64b2', 'ws_sub_pen_conc3', 'concretenewb256', 'ws_sub_pen_conc', 'ws_tunnelwall2', 'vegaspavement2_256', 'blendpavement2b_256', 'hiwayinside5_256', 'dt_road_stoplinea', 'pierplanks02_128', 'vegasdirtypaveblend2', 'vegasdirtypave1_256', 'hiwayinside_256', 'hiwayinsideblend3_256', 'des_pave_trackstart', 'sf_pave6', 'stonesandkb2_128', 'ws_nicepave', 'sidelatino1_lae', 'kbpavement_test', 'craproad5_lae', 'pavebsand256grassblended', 'pavebsand256', ':Oroad01_law', }, ['img/9.union'] = { 'newpavement', 'dockpave_256', 'pavea256', }, ['img/10.union'] = { 'sjmhoodlawn41', 'plaintarmac1', }, ['img/11.union'] = { 'sw_stonesgrass', 'stones256', 'grassbrn2rockbrng' , 'ws_traingravel', ':Obrnclifftop', ':Obrncliffbtmbmp', 'redclifftop256', 'redcliffroof_la', 'hllblf2_lae', }, ['img/12.union'] = { --'rocktbrn128blndlit', 'lasclifface', 'rocktbrn128', 'cs_rockdetail2', 'cw2_mountdirtscree', 'sw_rockgrassb1', 'sw_rockgrass1' , 'des_redrock1', 'rocktbrn128blnd', 'des_redrock2', 'sw_traingravelb1', }, ['img/13.union'] = { 'sw_sand', 'sandstonemixb', 'sandnew_law', 'ws_drysand', 'ws_wetdryblendsand', 'ws_wetsand', 'desertgravel256', }, ['img/14.union'] = { 'tar_venturasjoin', 'crossing_law', 'snpdwargrn1', 'tar_1line256hvblend', 'roaddgrassblnd', 'tar_1line256hvlightsand', 'tar_1line256hvgtravel', 'tar_1line256hvblend2', 'tar_1line256hvblenddrtdot', 'tar_freewyleft', 'tar_1line256hv', 'des_1line256', 'des_1linetar', 'tar_1linefreewy', 'tar_lineslipway', 'des_1lineend', 'sf_junction3', 'sf_junction5', 'tar_1line256hvblenddrt', 'tar_freewyright', }, ['img/16.union'] = { 'gras07si', 'kb_ivy2_256', }, ['img/17.union'] = { -- дерево 'bcorya0', 'sm_bark_light', 'gen_log', 'bpiced1', 'bpinud2', 'sm_redwood_bark', 'bchamae', 'bzelka1', 'bgleda0', 'oakbark64', 'veg_bevtreebase', 'sm_josh_bark', 'bfraxa1', 'bthuja1', }, ['img/18.union'] = { 'fancy_slab128', 'coasty_bit4_sfe', 'stoneclad1', 'taxi_256', 'offwhitebrix', 'des_ranchwall1', 'ws_oldpaintedyello', 'ws_oldpaintedyello_b' , 'vgs_shopwall01_128', 'block2_high', 'sea_wall_temp', 'block', 'concretebigb256128', 'sw_tunnel01', 'sw_tunnel02bmp', 'sw_tunnel01lod', 'stormdrain3_nt', 'brick', 'carparkwall12_256', 'stormdrain1_nt', 'macbrij2_lae', 'rufwaldock1', 'stormdrain3_nt', 'stormdrain2_nt', 'laroad_offroad1', 'gb_nastybar20', 'ws_freeway2', 'ws_freeway1', 'wallgreyred128', 'stormdrain6', 'ws_coppersheet2', 'ws_goldengate2', 'ws_goldengate5b', 'stormdrain5_nt', 'sw_wallbrick_06', 'lasdockbar', 'cj_white_wall2', 'upt_conc floorclean', 'craproad3_lae', 'bow_warehousewall', 'macbrij4_lae', 'forumstand1_lae', 'block2_low', 'block2', 'woodsuport1_128' , 'woodsuport2_128', }, ['img/19.union'] = { 'sfncn_rockgrass3', }, ['img/20.union'] = { 'vgs_rockmid1a', 'vgs_rockbot1a', 'rocktq128_forestblend', 'rocktq128', 'rock_country128', 'rocktq128_dirt', 'rocktq128blender', 'rocktq128_grass4blend', 'sw_stones', 'des_redrockmid', 'sm_rock2_desert', 'des_redrockbot', 'des_yelrock', 'des_dirt2gygrass', 'rocktb128', 'greyrockbig' , }, ['img/21.union'] = { --'txgrass0_1', 'sm_des_bush2', 'sm_des_bush3', 'sm_des_bush1', }, ['img/22.union'] = { --Листя 'newtreeleaves128', 'newtreed256', 'tree19mi', 'sprucbr', 'elm_treegrn4' , 'locustbra', 'oakb', 'oak2b', 'trunk3', 'elmdead', 'sm_pinetreebit', 'oakleaf1', 'oakleaf2', 'elm_treegrn2', 'hazelbranch', 'hazelbrnch', 'pinebrnch1', 'ashbrnch', 'cedarwee', 'cedarbare', 'elmtreered', 'elm_treegrn', 'weeelm', }, ['img/23.union'] = { 'des_dirttrackx', }, ['img/24.union'] = { 'ws_oldpainted2', 'ws_goldengate5bnoalpha', 'dish_roundbit_a', 'ws_goldengate5', }, ['img/25.union'] = { 'telewireslong2', 'telewireslong', }, --Земля ['img/26.union'] = { 'stones256128', 'trainground2', 'newgrnd1brn_128', 'sw_dirt01', 'ws_rotten_concrete1', 'des_crackeddirt1', 'redstones01_256', }, --Брукывка ['img/27.union'] = { 'indund_64', 'brickred2', 'brickred', 'sm_conc_hatch', 'grass_concpath_128hv', 'tilered', 'd0acbe76', }, --Битон земля ['img/28.union'] = { 'ws_carparknew2', 'ws_carparknew1', 'ws_carparknew2a', 'lasjmslumwall', 'bow_abattoir_conc2', 'ws_sub_pen_conc2', 'carpark_128', 'parking2plain', 'parking2', 'heliconcrete', 'hseconcblend1_256', 'ws_carparknew2b', 'dustyconcrete', 'concretedust2_line', 'des_dustconc', 'drvin_ground1', 'grass_path_law', 'ws_airpt_concrete', }, --Криша ['img/29.union'] = { 'sanpedock5', 'fastfood1_lae', 'shingles3', 'des_oldtinroof', 'sjmscruffhut4', 'sw_cabinroof', 'sw_corrugtile', 'sw_slate01', 'ws_corr_metal3', 'ws_corr_metal2', 'acrooftop1256', 'corr_roof1', 'des_shingles', 'des_ghotwood1', 'genroof02_128', 'ws_corr_2_plain', 'roof01l256', 'browntin1', 'vgspawnroof02_128', 'shingles5', 'rooftiles1', 'hospunder_law', 'shingles2', 'woodroof01_128', 'rooftiles2', 'trail_wall1', 'corrroof_64hv', }, --Метал ['img/30.union'] = { 'banding9_64hv', 'redmetal', 'des_bytower1', 'metal1_128', 'bluemetal', 'des_facmetalsoild', 'sm_quarry_crusher1', 'lampost_16clr', 'lamppost', 'cj_lamppost1', 'lamppost2', 'cj_sheetmetal', 'a51_blastdoor', 'ws_greymetal', 'drvin_back', 'drvin_panel', 'iron', 'des_rails1', }, --Шифер ['img/31.union'] = { 'des_sherrifwall1', 'a51_vent1', 'block2bb', 'newall11-1', 'airportmetalwall256', 'dirtyledge_law', 'ws_corrugated1', 'ws_corrugated2', 'corrugated5_64hv', 'corugwall2-1', 'bluemetal02', 'sanpedock1', 'ws_airportwin3', 'ws_airportwall2', 'ws_whitewall2_top', 'coasty_fencet_sfe', 'crencouwall1', 'woodenpanels256', 'hilcouwall2', 'woodwalllight2256', }, --Дерево стыни ['img/32.union'] = { 'des_redslats' , 'des_motelwall5', 'sw_barnwood1', 'gb_nastybar08', 'des_woodfence1', 'des_bywall2', 'des_bywall1', 'boardwalk_la', 'des_greyslats', 'darkplanks1', 'ws_vic_wood1', 'sw_barnwoodblu', 'des_motelwall4', 'corugwall1', 'cratetop128', 'ws_green_wall1', 'des_greyboards', 'trail_side1', 'trail_wall2', 'des_ntwnwall1', }, --Битон стыни ['img/33.union'] = { 'latranswall1', 'latranswall2', 'newall4-4', 'puttywall1', 'compcouwall1', 'ws_sandstone1', 'trail_wall3', 'ws_rottenwall', 'sanpedock96', 'ws_airportwall1', 'ws_whitewall2_bottom', 'yellowall_la', 'corugwallnew6_128', 'bluapartwall1_256', 'des_brick1', 'des_roswin4', 'des_adobewall2', 'dockwall1', 'conc_wall2_128h', 'comptwall10', }, --Кровь ['img/34.union'] = { 'bloodpool_64', }, --Ефекти ['img/afterburner.union'] = { 'afterburner',}, ['img/ashes.union'] = { 'ashes',}, ['img/ashes2.union'] = { 'ashes2',}, ['img/beam.union'] = { 'beam',}, ['img/beamcorona.union'] = { 'beamcorona',}, ['img/beastie.union'] = { 'beastie',}, ['img/Bgush1.union'] = { 'Bgush1',}, ['img/Bgush2.union'] = { 'Bgush2',}, ['img/Bgush3.union'] = { 'Bgush3',}, ['img/Bgush4.union'] = { 'Bgush4',}, ['img/blaze1.union'] = { 'blaze1',}, ['img/blaze2.union'] = { 'blaze2',}, ['img/blaze3.union'] = { 'blaze3',}, ['img/blaze4.union'] = { 'blaze4',}, ['img/blood1.union'] = { 'blood1',}, ['img/blood2.union'] = { 'blood2',}, ['img/blood3.union'] = { 'blood3',}, ['img/blood4.union'] = { 'blood4',}, ['img/BloodCloud.union'] = { 'BloodCloud',}, ['img/blooddrop1.union'] = { 'blooddrop1',}, ['img/blooddrop2.union'] = { 'blooddrop2',}, ['img/blooddrop3.union'] = { 'blooddrop3',}, ['img/blooddrop4.union'] = { 'blooddrop4',}, ['img/BloodRayne.union'] = { 'BloodRayne',}, ['img/BloodSplash.union'] = { 'BloodSplash',}, ['img/Bnitro.union'] = { 'Bnitro',}, ['img/boatsplash.union'] = { 'boatsplash',}, ['img/boatwake1.union'] = { 'boatwake1',}, ['img/bsplat1.union'] = { 'bsplat1',}, ['img/bsplat2.union'] = { 'bsplat2',}, ['img/bsplat3.union'] = { 'bsplat3',}, ['img/bsplat4.union'] = { 'bsplat4',}, ['img/bsplat5.union'] = { 'bsplat5',}, ['img/bubbles.union'] = { 'bubbles',}, ['img/burn1.union'] = { 'burn1',}, ['img/burn2.union'] = { 'burn2',}, ['img/burn3.union'] = { 'burn3',}, ['img/burn4.union'] = { 'burn4',}, ['img/butterfly1.union'] = { 'butterfly1',}, ['img/butterfly2.union'] = { 'butterfly2',}, ['img/butterfly3.union'] = { 'butterfly3',}, ['img/By.union'] = { 'By',}, ['img/cardebris1.union'] = { 'cardebris1',}, ['img/cardebris2.union'] = { 'cardebris2',}, ['img/cardebris3.union'] = { 'cardebris3',}, ['img/cardebris4.union'] = { 'cardebris4',}, ['img/cardebris5.union'] = { 'cardebris5',}, ['img/cardebris_01.union'] = { 'cardebris_01',}, ['img/cardebris_02.union'] = { 'cardebris_02',}, ['img/cardebris_03.union'] = { 'cardebris_03',}, ['img/cardebris_04.union'] = { 'cardebris_04',}, ['img/cardebris_05.union'] = { 'cardebris_05',}, ['img/carsplash_02.union'] = { 'carsplash_02',}, ['img/cement.union'] = { 'cement',}, ['img/cloudmasked.union'] = { 'cloudmasked',}, ['img/coronaringa.union'] = { 'coronaringa',}, ['img/Debris1.union'] = { 'Debris1',}, ['img/Debris2.union'] = { 'Debris2',}, ['img/Debris3.union'] = { 'Debris3',}, ['img/DebrisGaEX.union'] = { 'DebrisGaEX',}, ['img/dirt1.union'] = { 'dirt1',}, ['img/dirt2.union'] = { 'dirt2',}, ['img/dragon.union'] = { 'dragon',}, ['img/drift1.union'] = { 'drift1',}, ['img/drift2.union'] = { 'drift2',}, ['img/drift3.union'] = { 'drift3',}, ['img/drift4.union'] = { 'drift4',}, ['img/driftb1.union'] = { 'driftb1',}, ['img/driftb2.union'] = { 'driftb2',}, ['img/driftb3.union'] = { 'driftb3',}, ['img/driftb4.union'] = { 'driftb4',}, ['img/Drop1.union'] = { 'Drop1',}, ['img/Drop2.union'] = { 'Drop2',}, ['img/electric1.union'] = { 'electric1',}, ['img/electric2.union'] = { 'electric2',}, ['img/electric3.union'] = { 'electric3',}, ['img/electric4.union'] = { 'electric4',}, ['img/electric5.union'] = { 'electric5',}, ['img/electric6.union'] = { 'electric6',}, ['img/electric7.union'] = { 'electric7',}, ['img/electric8.union'] = { 'electric8',}, ['img/Fdebris1.union'] = { 'Fdebris1',}, ['img/Fdebris2.union'] = { 'Fdebris2',}, ['img/Fdebris3.union'] = { 'Fdebris3',}, ['img/Fdebris4.union'] = { 'Fdebris4',}, ['img/feather.union'] = { 'feather',}, ['img/fireball1.union'] = { 'fireball1',}, ['img/fireball10.union'] = { 'fireball10',}, ['img/fireball2.union'] = { 'fireball2',}, ['img/fireball3.union'] = { 'fireball3',}, ['img/fireball4.union'] = { 'fireball4',}, ['img/fireball5.union'] = { 'fireball5',}, ['img/fireball6.union'] = { 'fireball6',}, ['img/fireball7.union'] = { 'fireball7',}, ['img/fireball8.union'] = { 'fireball8',}, ['img/fireball9.union'] = { 'fireball9',}, ['img/FireEX.union'] = { 'FireEX',}, ['img/fireball2.union'] = { 'wjet6',}, -- --['img/FireEX.union'] = { 'bullethitsmoke',}, -- ['img/FireFlame.union'] = { 'FireFlame',}, ['img/FireFlame3.union'] = { 'FireFlame3',}, ['img/flake1.union'] = { 'flake1',}, ['img/flake2.union'] = { 'flake2',}, ['img/flame1.union'] = { 'flame1',}, ['img/flame2.union'] = { 'flame2',}, ['img/flame3.union'] = { 'flame3',}, ['img/flame4.union'] = { 'flame4',}, ['img/flamethrower.union'] = { 'flamethrower',}, ['img/flash1.union'] = { 'flash1',}, ['img/flash2.union'] = { 'flash2',}, ['img/flash3.union'] = { 'flash3',}, ['img/flash4.union'] = { 'flash4',}, ['img/fly1.union'] = { 'fly1',}, ['img/fly2.union'] = { 'fly2',}, ['img/fly3.union'] = { 'fly3',}, ['img/Fnitro.union'] = { 'Fnitro',}, ['img/Foliage.union'] = { 'Foliage',}, ['img/Function-X-.union'] = { 'Function-X-',}, ['img/gameleaf01_64.union'] = { 'gameleaf01_64',}, ['img/gensplash.union'] = { 'gensplash',}, ['img/glassmall.union'] = { 'glassmall',}, ['img/glowlight.union'] = { 'glowlight',}, ['img/gore1.union'] = { 'gore1',}, ['img/gore2.union'] = { 'gore2',}, ['img/gore3.union'] = { 'gore3',}, ['img/gore4.union'] = { 'gore4',}, ['img/gum.union'] = { 'gum',}, ['img/GunFlash.union'] = { 'GunFlash',}, ['img/GunFlash1.union'] = { 'GunFlash1',}, ['img/GunFlash2.union'] = { 'GunFlash2',}, ['img/GunFlash3.union'] = { 'GunFlash3',}, ['img/GunFlash4.union'] = { 'GunFlash4',}, ['img/gunshell.union'] = { 'gunshell',}, ['img/headshot1.union'] = { 'headshot1',}, ['img/headshot2.union'] = { 'headshot2',}, ['img/headshot3.union'] = { 'headshot3',}, ['img/headshot4.union'] = { 'headshot4',}, ['img/headshot5.union'] = { 'headshot5',}, ['img/inferno1.union'] = { 'inferno1',}, ['img/inferno2.union'] = { 'inferno2',}, ['img/inferno3.union'] = { 'inferno3',}, ['img/inferno4.union'] = { 'inferno4',}, ['img/inferno5.union'] = { 'inferno5',}, ['img/inflame1.union'] = { 'inflame1',}, ['img/inflame2.union'] = { 'inflame2',}, ['img/inflame3.union'] = { 'inflame3',}, ['img/inflame4.union'] = { 'inflame4',}, ['img/inflamed1.union'] = { 'inflamed1',}, ['img/inflamed2.union'] = { 'inflamed2',}, ['img/inflamed3.union'] = { 'inflamed3',}, ['img/inflamed4.union'] = { 'inflamed4',}, ['img/laser.union'] = { 'laser',}, ['img/leaf1.union'] = { 'leaf1',}, ['img/leaf2.union'] = { 'leaf2',}, ['img/light1.union'] = { 'light1',}, ['img/light2.union'] = { 'light2',}, ['img/light3.union'] = { 'light3',}, ['img/light4.union'] = { 'light4',}, ['img/light5.union'] = { 'light5',}, ['img/light6.union'] = { 'light6',}, ['img/lightning1.union'] = { 'lightning1',}, ['img/lightning2.union'] = { 'lightning2',}, ['img/lightning3.union'] = { 'lightning3',}, ['img/lightning4.union'] = { 'lightning4',}, ['img/lightning5.union'] = { 'lightning5',}, ['img/molotov1.union'] = { 'molotov1',}, ['img/molotov2.union'] = { 'molotov2',}, ['img/molotov3.union'] = { 'molotov3',}, ['img/molotov4.union'] = { 'molotov4',}, ['img/muzzle1.union'] = { 'muzzle1',}, ['img/muzzle2.union'] = { 'muzzle2',}, ['img/muzzle3.union'] = { 'muzzle3',}, ['img/muzzle4.union'] = { 'muzzle4',}, ['img/neon.union'] = { 'neon',}, ['img/NewFx1.union'] = { 'NewFx1',}, ['img/NewFx2.union'] = { 'NewFx2',}, ['img/NewFx3.union'] = { 'NewFx3',}, ['img/newspaper.union'] = { 'newspaper',}, ['img/Overdoseeffects.union'] = { 'Overdoseeffects',}, ['img/paper1.union'] = { 'paper1',}, ['img/paper2.union'] = { 'paper2',}, ['img/paper3.union'] = { 'paper3',}, ['img/paper4.union'] = { 'paper4',}, ['img/Pnitro.union'] = { 'Pnitro',}, ['img/pointlight.union'] = { 'pointlight',}, ['img/puke.union'] = { 'puke',}, ['img/railex.union'] = { 'railex',}, ['img/rain1.union'] = { 'rain1',}, ['img/rain2.union'] = { 'rain2',}, ['img/rain3.union'] = { 'rain3',}, ['img/rain4.union'] = { 'rain4',}, ['img/realex1.union'] = { 'realex1',}, ['img/realex2.union'] = { 'realex2',}, ['img/realex3.union'] = { 'realex3',}, ['img/realex4.union'] = { 'realex4',}, ['img/realexb1.union'] = { 'realexb1',}, ['img/realexb2.union'] = { 'realexb2',}, ['img/realexb3.union'] = { 'realexb3',}, ['img/realexb4.union'] = { 'realexb4',}, ['img/realfire1.union'] = { 'realfire1',}, ['img/realfire2.union'] = { 'realfire2',}, ['img/realfire3.union'] = { 'realfire3',}, ['img/realfire4.union'] = { 'realfire4',}, ['img/rope1.union'] = { 'rope1',}, ['img/rope2.union'] = { 'rope2',}, ['img/snow1.union'] = { 'snow1',}, ['img/snow2.union'] = { 'snow2',}, ['img/snow3.union'] = { 'snow3',}, ['img/sonic1.union'] = { 'sonic1',}, ['img/sonic2.union'] = { 'sonic2',}, ['img/sparkdebris1.union'] = { 'sparkdebris1',}, ['img/sparkdebris2.union'] = { 'sparkdebris2',}, ['img/sparkdebris3.union'] = { 'sparkdebris3',}, ['img/sparkdebris4.union'] = { 'sparkdebris4',}, ['img/Sparks.union'] = { 'Sparks',}, ['img/Sparks2.union'] = { 'Sparks2',}, ['img/Sparks3.union'] = { 'Sparks3',}, ['img/Sparks4.union'] = { 'Sparks4',}, ['img/Sparks5.union'] = { 'Sparks5',}, ['img/Sparks6.union'] = { 'Sparks6',}, ['img/Sparks7.union'] = { 'Sparks7',}, ['img/SparksFlash.union'] = { 'SparksFlash',}, --['img/sphere.union'] = { 'sphere',}, ['img/sphere_CJ.union'] = { 'sphere_CJ',}, ['img/splash1.union'] = { 'splash1',}, ['img/splash2.union'] = { 'splash2',}, ['img/splash3.union'] = { 'splash3',}, ['img/splash4.union'] = { 'splash4',}, ['img/splash5.union'] = { 'splash5',}, ['img/splash6.union'] = { 'splash6',}, ['img/splash_up.union'] = { 'splash_up',}, ['img/splash_up1.union'] = { 'splash_up1',}, ['img/splash_up2.union'] = { 'splash_up2',}, ['img/splatter1.union'] = { 'splatter1',}, ['img/splatter2.union'] = { 'splatter2',}, ['img/splatter3.union'] = { 'splatter3',}, ['img/splatter4.union'] = { 'splatter4',}, ['img/water1.union'] = { 'water1',}, ['img/water2.union'] = { 'water2',}, ['img/water3.union'] = { 'water3',}, ['img/water4.union'] = { 'water4',}, ['img/waterripple1.union'] = { 'waterripple1',}, ['img/waterripple2.union'] = { 'waterripple2',}, ['img/waterripple3.union'] = { 'waterripple3',}, ['img/waterripple4.union'] = { 'waterripple4',}, ['img/waterspark.union'] = { 'waterspark',}, ['img/waterspark_16.union'] = { 'waterspark_16',}, ['img/wgush1.union'] = { 'wgush1',}, ['img/wjet2.union'] = { 'wjet2',}, ['img/wjet4.union'] = { 'wjet4',}, ['img/wjet6.union'] = { 'wjet6',}, ['img/wood1.union'] = { 'wood1',}, ['img/wood2.union'] = { 'wood2',}, ['img/wood3.union'] = { 'wood3',}, ['img/wood4.union'] = { 'wood4',}, ['img/fx2/carfx1.union'] = { 'carfx1',}, ['img/fx2/cloud1.union'] = { 'cloud1',}, ['img/fx2/cloudhigh.union'] = { 'cloudhigh',}, ['img/fx2/cloudmasked.union'] = { 'cloudmasked',}, ['img/fx2/coronaheadlightline.union'] = { 'coronaheadlightline',}, ['img/fx2/coronamoon.union'] = { 'coronamoon',}, ['img/fx2/coronareflect.union'] = { 'coronareflect',}, ['img/fx2/coronaringb.union'] = { 'coronaringb',}, ['img/fx2/coronastar.union'] = { 'coronastar',}, ['img/fx2/finishFlag.union'] = { 'finishFlag',}, ['img/fx2/handman.union'] = { 'handman',}, ['img/fx2/headlight.union'] = { 'headlight',}, ['img/fx2/headlight1.union'] = { 'headlight1',}, ['img/fx2/lamp_shad_64.union'] = { 'lamp_shad_64',}, ['img/fx2/lockon.union'] = { 'lockon',}, ['img/fx2/lockonFire.union'] = { 'lockonFire',}, ['img/fx2/lunar.union'] = { 'lunar',}, ['img/fx2/particleskid.union'] = { 'particleskid',}, ['img/fx2/rainfx.union'] = { 'rainfx',}, ['img/fx2/roadsignfont.union'] = { 'roadsignfont',}, ['img/fx2/seabd32.union'] = { 'seabd32',}, ['img/fx2/shad_bike.union'] = { 'shad_bike',}, ['img/fx2/shad_car.union'] = { 'shad_car',}, ['img/fx2/shad_exp.union'] = { 'shad_exp',}, --['img/fx2/shad_heli.union'] = { 'shad_heli',}, ['img/fx2/shad_ped.union'] = { 'shad_ped',}, ['img/fx2/shad_rcbaron.union'] = { 'shad_rcbaron',}, ['img/fx2/Sky.union'] = { 'Sky',}, ['img/fx2/Sky2.union'] = { 'Sky2',}, ['img/fx2/Sky3.union'] = { 'Sky3',}, ['img/fx2/Skysnow.union'] = { 'Skysnow',}, ['img/fx2/target256.union'] = { 'target256',}, ['img/fx2/txgrassbig0.union'] = { 'txgrassbig0',}, ['img/fx2/txgrassbig1.union'] = { 'txgrassbig1',}, ['img/fx2/waterclear256.union'] = { 'waterclear256',}, ['img/fx2/waterwake.union'] = { 'waterwake',}, ['img/fx2/white.union'] = { 'white',}, ['img/fx2/wincrack_32.union'] = { 'wincrack_32',}, ['1.png'] = { 'sphere',}, } function loadShaders () for path,texstures in pairs (shaderMap) do local shader = dxCreateShader('shader.fx') table.insert(shaderList, shader) local terrain = dxCreateTexture(path) dxSetShaderValue(shader, 'gTexture', terrain) for i,txd in ipairs (texstures) do engineRemoveShaderFromWorldTexture(nightShader, txd) engineApplyShaderToWorldTexture(shader,txd) end end end addEventHandler( "onClientResourceStart", resourceRoot, loadShaders )
-
--By Fanbox --1 Прості itemTableZombies = { {"Cuțit de vânătoare",335,1,90,1}, {"Morfină",2976,0.15,0,1}, {"Sticlă de apă",2976,0.15,0,1}, {"Lapte la pungă",2976,0.15,0,1}, {"Bani",2976,0.15,0,3}, } --2 itemTableFastZombies = { -- Прості воєнні {"Mini Pachet cu sânge",2891,2.2,0,1}, {"Compas",2976,0.15,0,1}, {"Chibrituri",2976,0.15,0,1}, {"Costum ( Maro )",2976,0.15,0,1}, {"Bani",2976,0.15,0,5}, } --3 itemTableSoldZombies = { -- вещи солдат с шлемом {"GPS",2976,0.15,0,1}, {"Bandaj",2976,0.15,0,1}, {"Binoclu",2976,0.15,0,1}, {"Măsurător",2976,0.15,0,1}, {"Bani",2976,0.15,0,2}, } --4 bearItems = { {"Carne crudă",2976,0.15,0,10}, } --5 wolfItems = { {"Carne crudă",2976,0.15,0,5}, } --6 foxItems = { {"Carne crudă",2976,0.15,0,4}, } --7 AnimalItems = { {"Carne crudă",2976,0.15,0,3}, } bossBlood = { {"Bani",2976,0.15,0,50}, } bossAll = { {"Bani",2976,0.15,0,50}, } pialarama = { {"Drujbă",2976,0.15,0,1}, } tableZombie = { -- Обичні --LV {1325.6611328125, 1194.2373046875, 10.671875,2,13}, {1415.8837890625, 1091.703125, 10.8203125,1,14}, {1367.529296875, 918.47265625, 10.546276092529,2,13}, {1852.556640625, 892.244140625, 10.8203125,2,10}, {2011.7490234375, 906.841796875, 10.8203125,2,12}, {1905.068359375, 967.830078125, 10.8203125,2,11}, {2057.3032226562, 1039.4567871094, 10.416250228882,2,13}, {2326.376953125, 1355.01953125, 7.1640625,2,14}, {2398.359375, 1478.4306640625, 10.8203125,2,15}, {2386.0888671875, 1542.2802734375, 10.8203125,2,18}, {2320.9013671875, 1609.2685546875, 10.8203125,1,16}, {2355.91796875, 2051.4248046875, 10.734253883362,1,15}, {2229.3037109375, 2451.3818359375, 10.846658706665,1,14}, {1929.630859375, 2346.6845703125, 10.671875,1,13}, {1963.1337890625, 2150.078125, 10.8203125,1,12}, {1766.9755859375, 2019.7607421875, 7.5829572677612,2,10}, {1667.9208984375, 1847.8349609375, 10.8203125,1,11}, {1594.5693359375, 1832.166015625, 10.8203125,2,12}, {1582.287109375, 1853.8564453125, 10.8203125,1,18}, {1277.4599609375, 1359.6328125, 10.8203125,1,17}, {1538.8486328125, 1156.84375, 10.8125,2,17}, {2131.2705078125, 1195.9716796875, 10.671875,1,15}, {2568.11328125, 1028.2822265625, 10.8203125,1,13}, {2738.12109375, 869.4052734375, 10.8984375,1,12}, {2804.60546875, 1376.865234375, 10.75,2,10}, {1665.580078125, 1617.912109375, 10.8203125,2,15}, {1827.171875, 1502.357421875, 8.8069267272949,1,16}, {1768.9130859375, 1246.7578125, 8.5469856262207,2,14}, {1830.5263671875, 956.98828125, 9.8958320617676,2,14}, {1850.72265625, 721.7900390625, 11.354105949402,2,14}, {1927.04296875, 691.6474609375, 10.8203125,1,13}, {1903.5556640625, 733.9921875, 10.8203125,1,12}, {1900.9326171875, 585.380859375, 10.8203125,1,13}, {2125.068359375, 808.259765625, 9.7997341156006,1,10}, {2234.4501953125, 671.373046875, 11.359375,1,10}, {2365.5517578125, 617.759765625, 10.8203125,1,11}, {2564.7431640625, 694.798828125, 10.671875,2,12}, {2401.1162109375, 760.041015625, 10.821153640747,2,13}, {2304.6806640625, 714.4384765625, 10.671875,2,18}, {2427.5087890625, 707.302734375, 10.759969711304,2,11}, {2555.138671875, 780.271484375, 10.8203125,2,10}, {2734.1396484375, 791.943359375, 10.8984375,2,14}, {2734.306640625, 936.5927734375, 10.902780532837,2,13}, {2821.6806640625, 1159.7861328125, 10.853280067444,2,12}, {2667.2431640625, 1286.6953125, 10.8203125,2,11}, {2683.986328125, 1444.1435546875, 9.2593698501587,1,14}, {2772.2275390625, 1664.0654296875, 10.8203125,2,15}, {2666.5693359375, 1878.2666015625, 10.8203125,2,18}, {2844.166015625, 2011.1181640625, 10.671875,1,17}, {2743.5029296875, 2114.9443359375, 13.023113250732,2,16}, {2670.7822265625, 2387.833984375, 8.6207160949707,1,12}, {2582.158203125, 2429.1162109375, 10.8203125,11}, {2523.8056640625, 2250.53125, 10.671875,1,12}, {2573.82421875, 2234.474609375, 12.016069412231,2,11}, {2357.99609375, 2225.2822265625, 11.642976760864,2,11}, {2338.7216796875, 2015.2763671875, 12.330458641052,1,12}, {1436.4853515625, 917.3779296875, 10.8203125,2,10}, {1504.2795410156, 1062.0939941406, 26.669282913208,1,10}, {1608.830078125, 1267.4990234375, 10.8125,1,15}, {1674.0166015625, 1413.35546875, 10.785367012024,1,14}, {1951.419921875, 1359.6171875, 9.109375,1,14}, {1999.546875, 1092.2890625, 10.671875,2,15}, {2118.98828125, 932.4853515625, 10.8203125,2,14}, {2106.388671875, 902.326171875, 10.8203125,2,13}, {2170.73046875, 916.0703125, 10.8203125,2,12}, {2251.2021484375, 976.5068359375, 10.671875,2,11}, {2418.412109375, 1079.5302734375, 10.8203125,1,11}, {2574.3310546875, 1106.9375, 10.8203125,1,11}, {2635.5439453125, 1107.3388671875, 10.8203125,1,10}, {2654.958984375, 1137.166015625, 10.8203125,1,17}, {2522.271484375, 1193.7548828125, 10.923619270325,1,16}, {2493.97265625, 1294.3125, 10.8125,1,15}, {2462.818359375, 1349.0849609375, 10.8203125,1,12}, {2417.9658203125, 1614.9599609375, 10.698512077332,1,13}, {2494.798828125, 1668.1357421875, 10.8203125,2,13}, {2508.283203125, 1822.1220703125, 10.858328819275,2,13}, {2514.1630859375, 1956.26953125, 10.746201515198,2,12}, {2424.1240234375, 1974.5244140625, 10.765051841736,2,18}, {2532.431640625, 2133.58203125, 10.8203125,2,13}, {2802.2412109375, 2200.1484375, 10.8203125,2,10}, {2817.2236328125, 2253.970703125, 10.8203125,1,11}, {2862.583984375, 2398.7880859375, 10.8203125,2,12}, {2898.845703125, 2504.3046875, 11.530093193054,1,15}, {-1112.2832, -1676.9189, 76.367188,2,2}, {-1113.2627, -1637.3428, 76.367188,2,7}, {-2130.6494, -2431.8369, 30.625,1,10}, {-2111.8174, -2407.2715, 31.308962,1,12}, {-2155.6064, -2551.2158, 30.617188,1,13}, {-2173.7197, -2535.7998, 30.617188,1,14}, {-2226.0244, -2401.0332, 31.984375,1,15}, {-2199.3447, -2310.1074, 31.640337,1,16}, {2744.5322, -2447.4521, 13.648438,1,17}, {2451.3145, -2633.4414, 13.662846,1,18}, {2438.2666, -2020.5684, 13.902541,1,10}, {1443.0029, -1602.7178, 13.546875,1,11}, {1498.8623, -1640.9883, 14.046875,1,11}, {1513.377, -1712.4482, 14.046875,1,12}, {1488.1768, -1769.7705, 18.795755,1,13}, {1132.4248, -2035.2051, 69.007813,1,14}, {2659.3672, -1421.7402, 30.464893,1,15}, {2480.6133, -1461.9355, 24.180712,1,16}, {2296.9346, -1519.5459, 27.317057,1,17}, {2143.502, -1484.4697, 25.539063,1,18}, {2127.458, -1313.6748, 25.539063,1,2}, {1802.4668, -1347.917, 15.346227,1,2}, {470.58789, -1843.1367, 4.3484335,1,2}, {209.15039, -1836.6016, 3.7295032,1,2}, {829.30469, -1868.7344, 12.867188,1,2}, {1962.9639, -1392.334, 16.605011,1,2}, {2221.4893, -1056.7988, 46.005867,1,7}, {2278.5898, -1047.5371, 49.488091,1,7}, {340.11914, -1346.1123, 14.507813,1,2}, {1039.6133, -901.16406, 42.461357,1,7}, {1036.959, -1030.7383, 32.073475,1,2}, {1026.7773, -1133.5713, 24.407848,1,2}, {989.76563, -1301.54, 13.51729,1,2}, {1111.3164, -1491.582, 22.769032,1,2}, {748.05957, -548.56738, 16.996553,1,7}, {1045.5723, -301.33203, 73.99308,1,2}, {1111.3926, -312.76074, 73.992188,1,10}, {2324.376, 89.911133, 26.337715,1,11}, {2254.6875, 14.381836, 27.476563,1,12}, {2320.6504, 28.523438, 26.484375,1,13}, {2503.8154, 135.99023, 26.476563,1,14}, {2511.002, -25.285156, 27.658157,1,15}, {1285.8525, 341.95703, 19.554688,1,16}, {1338.4727, 289.27734, 19.561453,1,17}, {1342.0176, 196.70313, 20.223354,1,18}, {1238.1523, 185.26953, 19.554688,1,2}, {1223.916, 293.5498, 19.554688,1,7}, {245.45703, -87.37793, 1.9963558,1,10}, {198.09668, -171.74902, 1.578125,1,11}, {210.03516, -230.13086, 1.7786188,1,12}, {90.02832, -294.65918, 1.578125,1,13}, {-9.4580078, -92.439453, 3.1509881,1,14}, {-10.345703, -65.59375, 3.123158,1,15}, {-6.7509766, -17.583008, 3.2624781,1,16}, {14.706055, 34.75, 3.27057,1,17}, {41.261719, 57.650391, 3.1775858,1,18}, {73.330078, 28.405273, 0.6912424,1,2}, {63.432617, -33.199219, 0.8241868,1,7}, {-74.235352, -5.1064453, 3.1171875,1,10}, {-113.17285, -76.774414, 4.4485888,1,11}, {-100.0293, -333.83887, 1.612601,1,12}, {-23.986328, -286.36328, 5.4296875,1,13}, {681.72266, -663.35742, 16.1875,1,14}, {-1970.416, 86.400391, 27.6875,1,15}, {-1985.9492, 144.25293, 27.6875,1,16}, {-2031.2451, 173.35059, 29.051552,1,17}, {-2122.0273, 252.44727, 35.704983,1,18}, {-2134.876, 129.62207, 35.274288,1,2}, {-2268.4971, 105.94922, 35.171848,1,7}, {-2603.6895, 41.378906, 4.3140945,1,10}, {-2674.3398, -2.3125, 8.0790243,1,11}, {-2668.9609, -171.26465, 4.328125,1,12}, {-2748.4541, -241.61914, 7.1875,1,13}, {-1635.6504, 1202.3994, 7.1796875,1,14}, {-3394.6973, 887.40918, 16.978125,1,15}, {-3388.0566, 863.45605, 17.758034,1,16}, {-3427.3965, 698.66309, 23.263651,1,17}, {-3439.0674, 660.56348, 24.836138,1,18}, {-2678.3135, 1261.333, 55.429688,1,2}, {-2531.377, 1226.0225, 37.428329,1,7}, {-1959.6826, 1326.3359, 7.2042542,1,10}, {-1697.5029, 1266.0557, 7.1796875,1,11}, {-1427.6318, 1493.2012, 7.1015625,1,12}, {-240.0459, 2731.543, 62.6875,1,13}, {-216.87305, 2655.4248, 62.601563,1,14}, {-272.82422, 2614.3066, 62.873177,1,15}, {-319.55273, 2667.8828, 62.83596,1,16}, {1063.4785, 1075.1836, 10.15049,1,17}, {1140.0703, 1022.9004, 11,1,18}, {1664.3828, 1039.5957, 10.820313,1,2}, {1945.2412, 1346.3789, 9.109375,1,7}, {2062.6914, 1893.4609, 11.872293,1,10}, {2198.3965, 1848.7354, 10.820313,1,11}, {2214.6973, 2141.4951, 10.908304,1,12}, {2315.248, 2137.377, 11.303985,1,13}, {2354.623, 2082.1025, 10.671875,1,14}, {2532.2539, 2321.4443, 10.671875,1,15}, {2288.9709, 2354.7952, 11.902043,1,16}, {1609.1992, 2341.7324, 10.820313,1,17}, {1434.3438, 2617.959, 11.392614,1,18}, {1433.832, 2651.418, 11.548323,1,2}, {1420.2637, 2774.1436, 14.820313,1,7}, {1590.4229, 2186.8193, 10.820313,1,10}, {2303.9707, 2775.5127, 10.820313,1,11}, {2892.9453, 2609.2813, 10.916293,1,12}, {1688.1563, 726.63184, 10.820313,1,13}, {1583.8516, 716.7832, 10.820313,1,14}, {-260.16406, -2180.4707, 29.00709,1,15}, {-807.7168, 1560.1914, 26.960938,1,16}, {-722.23828, 1550.9346, 40.680454,1,17}, {-857.95312, 1622.6475, 26.960072,1,18}, {-2471.6758, 2446.9883, 16.254856,1,2}, {-2373.501, 2436.5869, 9.2006359,1,7}, {-2259.1768, 2317.7412, 4.8125,1,10}, {-2460.3018, 2238.0498, 4.7918186,1,11}, {-2553.3701, 2269.4971, 5.0918374,1,12}, {-2610.8271, 2355.6221, 8.6841326,1,13}, --LOGIN PANEL {2256.9905, -2129.4802, -52.017189,1,10}, {2270.7268, -2139.8396, -52.017189,1,11}, {2279.8967, -2148.3464, -52.017189,1,12}, {2296.9231, -2158.323, -52.017189,1,13}, {2316.9309, -2172.0974, -52.017189,1,14}, {2327.8518, -2181.2156, -52.017189,1,15}, {2339.5637, -2190.4431, -52.017189,1,16}, {2301.5901, -2162.3191, -52.017189,1,17}, {2279.7415, -2147.446, -52.017189,1,18}, {2265.6907, -2135.8328, -52.017189,1,48}, {2298.3779, -2099.4795, -52.017189,1,69}, {2312.3401, -2109.3542, -51.859444,1,10}, {2349.4717, -2136.4912, -52.017189,1,11}, {2373.873, -2154.5615, -52.017189,1,12}, {2383.6631, -2159.293, -52.017189,1,13}, {2202.1172, -2189.5454, -52.017189,1,14}, {2217.1787, -2201.7114, -52.017189,1,15}, {2235.3721, -2214.896, -52.017189,1,16}, {2241.3271, -2219.0474, -52.017189,1,17}, {2266.0654, -2234.5552, -52.017189,1,18}, {2274.7061, -2246.1929, -52.017189,1,48}, {2293.3408, -2254.1978, -52.017189,1,69}, --Военні {-1270.1748, 473.52539, 7.1809163,1,48}, {-1240.9219, 446.27441, 7.2773161,1,48}, {-1286.9932, 450.86035, 7.1875,1,48}, {-1333.5557, 436.78613, 7.1809163,1,48}, {-1369.3477, 299.30273, 7.29316,1,48}, {-1391.6836, 320.2373, 7.1875,1,48}, {-1476.3164, 323.43848, 7.1875,1,48}, {-1587.04, 295.98047, 7.1875,1,48}, {-1645.0059, 287.37207, 8.2924271,1,48}, {-1606.0371, 375.06543, 7.1803083,1,48}, {-1567.543, 377.72656, 7.1875,1,48}, {-1540.5937, 439.07422, 7.1875,1,48}, {-1602.9512, 663.83691, 7.1875,1,48}, {-1612.2031, 743.29102, -5.2421875,1,48}, {-1632.1396, 683.05566, -5.2421875,1,48}, {-1986.4193, 569.19336, 48.398438,1,48}, {-1950.3623, 604.72852, 28.040611,1,48}, {-1966.4932, 657.84375, 46.5625,1,48}, {-2699.4482, 600.51172, 14.45455,1,48}, {-2653.6094, 635.5791, 14.524934,1,48}, {-2589.165, 602.23145, 14.453125,1,48}, {-2584.9512, 648.90723, 14.453125,1,48}, {-2587.6799, 578.22754, 40.054688,1,48}, {-2108.5029, 2731.0928, 171.61719,1,48}, {-2063.3369, 2653.9629, 176.12466,1,48}, {-2077.7275, 2695.6343, 166.02322,1,48}, {244.05273, 2462.4521, 16.484375,1,48}, {298.51953, 2542.7939, 16.84856,1,48}, {340.19336, 2537.0947, 16.889799,1,48}, {360.25781, 2537.46, 16.689682,1,48}, {386.55508, 2535.4265, 26.861408,1,48}, {379.29297, 2436.0195, 16.967607,1,48}, {416.28711, 2464.9385, 16.993755,1,48}, {415.59042, 2539.7217, 16.886169,1,48}, {285.55078, 2615.5947, 17.185558,1,48}, {-137.25098, 1219.1774, 20.101736,1,48}, {-18.571289, 1186.0957, 19.433519,1,48}, {12.919922, 1173.6699, 19.483597,1,48}, {67.151367, 1169.8262, 19.608932,1,48}, {103.95801, 1071.9121, 13.609375,1,48}, {59.208008, 1726.415, 17.640625,1,48}, {67.461914, 1795.4404, 17.770092,1,48}, {57.466797, 1881.582, 17.75124,1,48}, {49.293945, 1955.3623, 17.748228,1,48}, {42.249023, 2036.2188, 17.78849,1,48}, {61.885742, 2115.8418, 18.750061,3,69}, {142.47168, 2124.6846, 18.859621,3,69}, {271.78809, 2140.4834, 18.471235,3,69}, {335.90527, 2158.3516, 23.992392,3,69}, {425.83984, 2105.0762, 19.650162,3,69}, {424.14844, 2012.1543, 17.291956,3,69}, {435.75195, 1945.6084, 20.599102,3,69}, {430.12793, 1862.5371, 20.348038,3,69}, {393.86621, 1813.1533, 20.921251,3,69}, {295.91797, 1718.3154, 17.794729,3,69}, {216.72461, 1655.5146, 15.880329,3,69}, {181.50879, 1645.165, 17.586863,3,69}, {133.83398, 1834.9082, 17.640625,3,69}, {111.81543, 1911.9414, 18.791006,3,69}, {133.36328, 1955.0742, 19.429214,3,69}, {171.97656, 1905.6895, 18.327799,3,69}, {206.7373, 1913.3486, 17.640625,3,69}, {272.24121, 1936.6387, 17.640625,3,69}, {256.34082, 1956.2012, 17.936186,3,69}, {357.74219, 1961.6826, 18.007463,3,69}, {273.03027, 1988.1348, 17.973433,3,69}, {302.85645, 2016.2471, 17.640625,3,69}, {268.83691, 2068.2832, 17.640625,3,69}, {223.36621, 2026.748, 17.640625,3,69}, {216.54883, 1965.9609, 17.640625,3,69}, {266.96524, 1886.7, 17.555365,3,69}, {315.21875, 1853.9199, 17.699696,3,69}, {231.20605, 1819.9727, 17.640625,3,69}, {214.91016, 1856.4111, 13.065226,3,69}, {267.28223, 1841.7266, 6.8656588,3,69}, {215.86621, 1822.2109, 6.4140625,3,69}, {281.09082, 1815.9121, 1.0078125,3,69}, {315.30469, 1838.5615, 7.828125,3,69}, {269.68457, 1882.9932, -29.482031,3,69}, {269.87402, 1922.7021, -29.469311,3,69}, {301.91602, 1920.9785, -29.473499,3,69}, {291.19571, 2298.9087, -30.40233,3,69}, {342.77051, 2403.9863, -29.477081,3,69}, {313.87109, 2119.666, -47.876171,3,69}, {442.29865, 2213.7373, -47.829182,3,69}, {598.89532, 2285.7681, -49.186516,3,69}, {807.96777, 2328.062, -47.884716,3,69}, {958.9082, 2312.4248, 10.820313,3,69}, {944.71875, 2363.6064, 10.862807,3,69}, {994.13379, 2363.8057, 10.820313,3,69}, {1015.8311, 2395.6514, 10.753633,3,69}, {2035.6143, 1672.4014, -3.09375,3,69}, {1962.1045, 1595.7852, -2.2476437,3,69}, {1937.0879, 1565.6572, -3.09375,3,69}, {1941.7549, 1569.7793, -3.09375,3,69}, {2063.3142, 1704.4258, -11.77956,3,69}, {1914.8184, 1543.4141, -3.09375,3,69}, {1867.3414, 1490.4176, -1.8257465,3,69}, {1772.946, 1426.8604, -3.1030359,3,69}, {1759.1135, 1374.054, -2.9977174,3,69}, {1649.9082, 1252.1494, -1.5503788,3,69}, {1580.9824, 1181.6191, -3.9986567,3,69}, {1500.7451, 1085.2344, -3.3102732,3,69}, {1548.9023, 1115.2627, 10.887033,3,69}, {1585.0709, 1128.1663, 12.219166,3,69}, {2251.9121, 1770.373, 10.7,3,69}, {2425.4414, 1770.9844, 10.671875,3,69}, {2455.6016, 1709.5264, 10.671875,3,69}, {2409.5303, 1661.3721, 12.153285,3,69}, {2363.1006, 1700.1223, 53.371258,3,69}, {2350.9229, 1797.4824, 72,3,69}, {2365.2891, 1738.1738, 4.5853653,3,69}, {2369.9094, 1766.7532, -2.1245725,3,69}, {2501.344, 1766.9606, -1.994029,3,69}, {2636.8601, 1767.3861, -1.674346,3,69}, {2398.4219, 1732.459, -2.0446343,3,69}, {2375.1431, 1709.1136, -3.09375,3,69}, {2505.1582, 1708.1855, -3.09375,3,69}, {2548.9639, 1707.6006, -3.09375,3,69}, {2296.5137, 1704.924, -3.09375,3,69}, {2190.9756, 1707.126, -3.09375,3,69}, {1784.566, 1416.0564, 7.6963091,3,69}, {1483.1514, 740.47656, 11.466856,3,69}, {1523.8926, 742.23828, 11.023438,3,69}, {1379.7236, 463.97363, 20.141636,3,69}, {1265.0469, 295.5293, 19.554688,3,69}, {1323.085, 206.04785, 19.554688,3,69}, {-720.62988, 2060.8545, 60.382813,3,69}, {2801.5049, 908.92383, 10.75,3,69}, {1557.0049, -1619.9863, 13.546875,3,69}, {1589.2549, -1631.4619, 13.382813,3,69}, {1580.3389, -1707.4482, 5.890625,3,69}, {629.77832, 876.75781, -42.953438,3,69}, {672.97559, 840.42578, -42.960937,3,69}, {565.8291, 816.38477, -29.835567,3,69}, --Острів {-3330.1016, 1604.7939, 3.7987411,1,2}, {-3395.5508, 1517.2178, 11.582377,1,7}, {-3408.8945, 1489.1895, 7.3577094,1,10}, {-3448.6047, 1632.1198, 19.507734,1,11}, {-3573.0195, 1617.1914, 23.775408,1,12}, {-3592.9116, 1505.3137, 24.707779,1,13}, {-3650.0684, 1413.7627, 9.2120609,1,14}, {-3622.5869, 1302.6074, 6.0390625,1,15}, {-3602.4199, 1234.6371, 16.239103,1,16}, {-3788.5205, 1345.5247, 43.130093,1,17}, {-3846.252, 1395.1602, 53.993904,1,18}, {-3905.2563, 1570.2532, 61.664055,1,2}, --Метро {2429.4258, -1965.7441, -52.117187,1,48}, {2361.365, -1982.6121, -56.303307,1,48}, {2336.1831, -2039.6628, -52.103233,1,48}, {2441.9863, -2120.5146, -52.117187,1,48}, {2285.4053, -2028.0596, -52.007835,1,48}, {2096.9917, -1925.9486, -53.744232,1,48}, {1910.2002, -1815.5576, -52.117187,1,48}, {1879.3486, -1808.1602, -51.996788,1,48}, {1521.8655, -1704.7712, -52.117187,1,48}, {1766.6521, -1737.7754, -52.127186,1,48}, {1686.1423, -1694.8855, -51.789841,1,48}, {1538.3962, -1612.8867, -52.117187,1,48}, {1485.6563, -1584.415, -51.980972,1,48}, {2200.5352, -1904.6846, -67,1,48,3,69}, {2176.0625, -1881.0127, -67,3,69}, {2209.5562, -1904.2477, -52.117187,3,69}, {2299.9082, -1927.7187, -52.117187,3,69}, {2497.2266, -1952.207, 13.436157,3,69}, {2463.6152, -1932.7236, 13.370953,3,69}, {2532.3535, -1928.5137, 13.382813,3,69}, {2519.6836, -1890.5381, 13.596931,3,69}, {2451.4248, -1975.3291, 13.553907,3,69}, {1690.5508, -1667.3906, 13.382813,3,69}, {1687.665, -1629.0107, 13.382813,3,69}, {1691.7168, -1595.7754, 13.385181,3,69}, {1690.5508, -1667.3906, 13.382813,3,69}, {1687.665, -1629.0107, 13.382813,3,69}, {1691.7168, -1595.7754, 13.385181,3,69}, {2240.665, 2456.9043, 10.820313,3,69}, {2300.4648, 2484.7441, 3.2734375,3,69}, {2247.624, 2486.6777, 3.2734375,3,69}, {2287.5811, 2484.8506, -7.453125,3,69}, {2252.7002, 2435.5967, -7.453125,3,69}, --Тварини --Ведмідь {-1069.4418945313, -1650.3364257813, 76.350845336914,4,19}, --Вовк {-1016.5682373047, -1688.9556884766, 77.5703125,5,20}, --Лис {-955.28173828125,-1718.2362060547, 77.5703125,6,21}, {-1963.2705, -1988.4971, 78.197479,4,19}, {-1884.3398, -1958.9316, 87.464157,5,20}, {-1789.3398, -2028.8682, 72.968018,6,21}, {-1738.377, -2142.9424, 53.718727,4,19}, {-1640.6895, -2190.1357, 31.547215,5,20}, {-1557.6182, -2072.0879, 44.471111,6,21}, {-1559.6152, -1975.5576, 77.073021,4,19}, {-1569.835, -1876.0254, 81.905136,5,20}, {-1535.3545, -1810.2988, 61.354122,6,21}, {-1423.4707, -1822.584, 45.961006,4,19}, {-1414.2324, -1962.874, 15.397358,5,20}, {-1352.0293, -2044.6465, 9.8601971,6,21}, {-1266.8721, -2092.1982, 24.022167,4,19}, {-1251.085, -2168.4492, 30.99844,5,20}, {-1299.6973, -2269.5762, 30.389217,6,21}, {-1364.5977, -2480.8301, 37.184956,4,19}, {-1364.9297, -2511.7979, 41.842781,5,20}, {-1393.3721, -2553.3467, 54.859398,6,21}, {-1419.4492, -2658.2861, 64.356735,4,19}, {-1444.666, -2723.7852, 62.217419,5,20}, {-1374.248, -2752.1836, 84.98735,6,21}, {-1068.4385, -2646.0859, 82.705215,4,19}, {-1027.3867, -2632.0586, 97.580696,5,20}, {-961.9707, -2539.6094, 102.58094,6,21}, {-1008.0527, -2490.5244, 78.048042,4,19}, {-1048.3301, -2428.1846, 61.675442,5,20}, {-1060.0127, -2353.1133, 53.937428,6,21}, {-1048.9229, -2290.2021, 53.471874,4,19}, {-1038.2588, -2155.8906, 35.318943,5,20}, {-1092.8818, -1997.2627, 47.951172,6,21}, {-1058.1924, -1891.3633, 79.098572,4,19}, {-1007.9863, -1816.2646, 95.206528,5,20}, {-1215.2783, -1610.1406, 67.389191,6,21}, --Здобич --Кіт {-955.28173828125,-1718.2362060547, 77.5703125,7,7,22}, --Курка {-955.28173828125,-1718.2362060547, 77.5703125,7,23}, --Козел {-955.28173828125,-1718.2362060547, 77.5703125,7,24}, --Свиня {-955.28173828125,-1718.2362060547, 77.5703125,7,25}, {-517.96387, -116.09277, 65.208954,7,22}, {-525.46289, -85.623047, 62.454456,7,23}, {-545.90039, -68.977539, 63.386589,7,24}, {-576.65625, -89.675781, 64.538719,7,25}, {-595.65039, -110.49609, 67.378403,7,22}, {-117.89355, 30.324219, 3.1171875,7,23}, {-90.058594, 28.447266, 3.1171875,7,24}, {-73.230469, 30.185547, 3.1171875,7,25}, {-60.289062, 36.345703, 3.1102695,7,22}, {-45.302734, 53.556641, 3.1171875,7,23}, {-37.310547, 30.746094, 3.109396,7,24}, {-13.963867, 38.918945, 3.1096497,7,25}, {2.9970703, 13.279297, 3.1171875,7,22}, {616.57227, 1215.3799, 11.71875,7,23}, {646.87012, 1225.1416, 11.71875,7,24}, {682.03516, 1229.1191, 11.88316,7,25}, {-364.48242, -1439.4209, 25.726563,7,22}, {-376.55371, -1437.6104, 25.726563,7,23}, {-383.39258, -1412.833, 25.726563,7,24}, {-1066.0244, -1072.9033, 129.21875,7,25}, {-1069.4707, -1108.2988, 129.00259,7,22}, {-1060.2314, -1141.1006, 129.21875,7,23}, {-1040.6182, -1169.4307, 129.21875,7,24}, {-1037.7266, -1208.2578, 129.21875,7,25}, {-1064.126, -1234.5, 129.21875,7,22}, {-1477.0039, 2039.0928, 47.383446,7,23}, {-1489.6445, 2019.2412, 47.267853,7,24}, {-1498.3008, 1992.9424, 48.030014,7,25}, {-1506.4951, 1977.0205, 48.421875,7,22}, {-442.08594, 2125.0654, 47.309097,7,23}, {-432.05078, 2156.9111, 44.576134,7,24}, {-436.00781, 2183.7363, 42.501671,7,25}, {-441.59863, 2193.3838, 42.961388,7,22}, {-690.92676, 965.75195, 12.196075,7,23}, {-672.5459, 950.59766, 12.132813,7,24}, {2389.1826, -649.71094, 127.35926,7,25}, {2380.8057, -652.93359, 127.51507,7,22}, {2369.7412, -658.60059, 128.27936,7,23}, {-1423.4053, -955.92871, 201.09375,7,24}, {-1440.0664, -960.15137, 201.09375,7,25}, {-1992.8232, -2418.7998, 30.625,7,22}, {-1975.1426, -2436.4834, 30.625,7,23}, {-1948.8389, -2414.8057, 30.625,7,24}, {-1976.25, -2390.4463, 31.505415,7,22}, --BOSS --Кровосос {-955.28173828125,-1718.2362060547, 77.5703125,8,26}, {-1407.5969, 386.30038, 7.0999999,8,26}, {-726.49219, 2059.3506, 60.327477,8,26}, {1266.6689, -2021.6348, 59.229351,8,26}, {-1013.0723, -660.13086, 32.007813,8,26}, --Пыла {-955.28173828125,-1718.2362060547, 77.5703125,10,27}, {-383.85645, 2226.2246, 42.157539,10,27}, {-2494.2158, -619.93945, 132.5625,10,27}, {-2320.4229, -1647.6133, 483.70313,10,27}, {2601.3076, -633.9873, 130.94301,10,27}, {1084.9678, 1084.9678, 10.835938,10,27}, --Просто боси --[[ {-955.28173828125,-1718.2362060547, 77.5703125,9,28}, {-955.28173828125,-1718.2362060547, 77.5703125,9,29}, {-955.28173828125,-1718.2362060547, 77.5703125,9,30}, {-955.28173828125,-1718.2362060547, 77.5703125,9,31}, ]] {-436.85937, -1422.0469, 21.500454,9,28}, {-1437.1895, -945.85645, 201.05707,9,29}, {-1647.0586, -1960.7842, 97.853058,9,30}, {1330.4248, 104.04395, 22.697889,9,31}, {-1424.8369, -2444.4443, 36.620007,9,28}, {1908.4971, -568.62695, 26.912523,9,29}, {-1490.1025, 2103.9131, 45.989391,9,30}, {-45.751953, 2267.9736, 41.3778,9,31}, {-2764.4941, -784.0166, 27.828051,9,28}, } function createZombie() local totalzombie = 0 for _, data in ipairs(tableZombie) do spawnNewZombie(data[1],data[2],data[3],nil,data[4],data[5]) totalzombie = totalzombie + 1 end outputDebugString("Map "..tostring(totalzombie).." zombies,animals,boss,bots") end createZombie() function destroyDeadZombie (ped,pedCol) destroyElement(ped) destroyElement(pedCol) end zombieKilled = function(killer, headshot) if killer then setElementData(killer, "zombieskilled", getElementData(killer, "zombieskilled") + 1) end local skin = getElementModel(source) local x, y, z = getElementPosition(source) local ped = createPed(skin, x, y, z) local pedCol = createColSphere(x, y, z, 1.5) killPed(ped) setTimer(destroyDeadZombie,3600000, 1, ped, pedCol) attachElements(pedCol, ped, 0, 0, 0) setElementData(pedCol, "parent", ped) setElementData(pedCol, "playername", "Zombie") setElementData(pedCol, "deadman", true) setElementData(ped, "deadzombie", true) setElementData(pedCol, "deadman", true) local creator = getElementData ( source, "creator" ) setTimer ( function () if isElement ( creator ) then setElementData ( creator, "spawnedzombies", ( getElementData ( creator, "spawnedzombies" ) or 1 ) - 1 ) end end, 3600000, 1 ) local spawn_x = getElementData(source,"spawn_x") local spawn_y = getElementData(source,"spawn_y") local spawn_z = getElementData(source,"spawn_z") local spawn_ztype = getElementData(source,"spawn_ztype") local spawn_skin = getElementData(source,"spawn_skin") setTimer(spawnZombieKill,3600000,1,spawn_x,spawn_y,spawn_z,spawn_ztype,spawn_skin) local time = getRealTime() local hours = time.hour local minutes = time.minute setElementData(pedCol,"deadreason","Pare mort, ora morții : "..hours..":"..minutes..".") if getElementData ( source, "soldier" ) then for i,item in ipairs(itemTableSoldZombies) do setElementData(pedCol, item[1], math.random(0,item[5])) end elseif getElementData ( source, "fast" ) then for i,item in ipairs(itemTableFastZombies) do setElementData(pedCol, item[1], math.random(0,item[5])) end --Твварини elseif getElementData ( source, "bear" ) then for i,item in ipairs(bearItems) do setElementData(pedCol, item[1], math.random(1,item[5])) end elseif getElementData ( source, "wolf" ) then for i,item in ipairs(wolfItems) do setElementData(pedCol, item[1], math.random(1,item[5])) end elseif getElementData ( source, "fox" ) then for i,item in ipairs(foxItems) do setElementData(pedCol, item[1], math.random(1,item[5])) end elseif getElementData ( source, "animal" ) then for i,item in ipairs(AnimalItems) do setElementData(pedCol, item[1], math.random(1,item[5])) end elseif getElementData ( source, "boss_blood" ) then for i,item in ipairs(bossBlood) do setElementData(pedCol, item[1], math.random(2,item[5])) end elseif getElementData ( source, "boss_all" ) then for i,item in ipairs(bossAll) do setElementData(pedCol, item[1], math.random(1,item[5])) end elseif getElementData ( source, "pila" ) then for i,item in ipairs(pialarama) do setElementData(pedCol, item[1], math.random(1,item[5])) end -- else for i,item in ipairs(itemTableZombies) do if item[5] then setElementData(pedCol, item[1],math.random(0,item[5])) end end end if isElement ( getElementData(source,"parent") ) then destroyElement(getElementData(source,"parent")) end local attaches = getAttachedElements ( source ) if attaches then for ElementKey, ElementValue in ipairs ( attaches ) do if isElement ( ElementValue ) then if not getElementData ( ElementValue, "zRadZone" ) then destroyElement ( ElementValue ) end end end end if isElement ( getElementData ( source, "zombieShape" ) ) then destroyElement ( getElementData ( source, "zombieShape" ) ) end if isElement ( getElementData ( source, "shapeFar" ) ) then destroyElement ( getElementData ( source, "shapeFar" ) ) end if isElement ( getElementData ( source, "shapeNear" ) ) then destroyElement ( getElementData ( source, "shapeNear" ) ) end destroyElement(source) if headshot == true then setPedHeadless( ped, true ) setElementData(killer, "headshots", getElementData(killer, "headshots") + 1) end end addEvent("onZombieGetsKilled", true) addEventHandler("onZombieGetsKilled", getRootElement(), zombieKilled) function math.percentChance (percent,repeatTime) local hits = 0 for i = 1, repeatTime do local number = math.random(0,200)/2 if number <= percent then hits = hits+1 end end return hits end function spawnZombieKill(spawn_x,spawn_y,spawn_z,spawn_ztype,spawn_skin) spawnNewZombie(spawn_x,spawn_y,spawn_z,false,spawn_ztype,spawn_skin) end This is on server side too: line 619, line 749.
-
Hi guys, i need some help, i think this bug is lagging my server, here are the errors and the script. [2017-04-08 15:40:41] WARNING: UNION_ZOMBIES/nz_s.lua:75: Bad argument @ 'createPed' [Expected number at argument 1, got nil] [2017-04-08 15:40:41] WARNING: UNION_ZOMBIES/nz_s.lua:76: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] [2017-04-08 15:40:41] WARNING: UNION_ZOMBIES/nz_s.lua:77: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] [2017-04-08 15:40:41] WARNING: UNION_ZOMBIES/nz_s.lua:78: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] [2017-04-08 15:40:41] WARNING: UNION_ZOMBIES/nz_s.lua:79: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] [2017-04-08 15:40:41] WARNING: UNION_ZOMBIES/nz_s.lua:80: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] --By Fanbox fast_blood = 15000 -- кровь у сильних sold_blood = 20000 -- кровь у солдатов zomb_blood = 5000 -- кровь у обычных зомби fast_damage = 3111 -- урон сильних sold_damage = 4112 -- урон быстрых зомби zomb_damage = 1121 -- урон обычных зомби --Тварини bear_blood = 20000 wolf_blood = 7000 fox_blood = 5000 bear_damage = 6111 wolf_damage = 3112 fox_damage = 1121 animal_blood = 2000 animal_damage = 100 boss_blood_blood = 75000 boss_blood_damage = 5123 boss_all_blood = 50000 boss_all_damage = 4212 function chasedStartAttack (zomb) if isElement ( zomb ) and not getElementData ( zomb, "target" ) then if getElementData ( zomb, "zHeared" ) then setElementData ( zomb, "zHeared", false ) end setElementSyncer ( zomb, source ) setPedAnimation ( zomb ) if not exports.npc_hlc:isHLCEnabled ( zomb ) then exports.npc_hlc:enableHLCForNPC( zomb, getElementData ( zomb,"speed") or "sprint") end exports.npc_hlc:clearNPCTasks (zomb) exports.npc_hlc:addNPCTask ( zomb, {"killPed", source, 2, 2} ) setElementData ( zomb, "target", source ) setElementAlpha ( zomb, 255 ) end end addEvent( "chasedStartAttackC", true ) addEventHandler( "chasedStartAttackC", getRootElement(), chasedStartAttack ) local stats = { [ 69 ] = 500, [ 70 ] = 999, [ 71 ] = 999, [ 72 ] = 999, [ 73 ] = 500, [ 74 ] = 999, [ 75 ] = 500, [ 76 ] = 999, [ 77 ] = 999, [ 78 ] = 999, [ 79 ] = 999, [ 160 ] = 999, [ 229 ] = 999, [ 230 ] = 999 } function applyStats(player) for stat,value in pairs(stats) do setPedStat(player, stat, value) end end function spawnNewZombie(x, y, z, creator, ztype, skin) local zomb = createPed(skin,x,y,z+0.5,math.random(0,360),true) setElementData(zomb,"spawn_x",x) setElementData(zomb,"spawn_y",y) setElementData(zomb,"spawn_z",z) setElementData(zomb,"spawn_ztype",ztype) setElementData(zomb,"spawn_skin",skin) if isElement ( zomb ) then if not isElementInWater ( zomb ) then setTimer ( activateZombie, 1000, 1, zomb, x, y, z, ztype ) setElementData ( zomb, "creator", creator ) return true else destroyElement ( zomb ) return false end end return false end function activateZombie (zomb, x, y, z, ztype) if isElement ( zomb ) then local zSphere = createColSphere ( x, y, z, 50 ) local zSphereFar = createColSphere ( x, y, z, 150 ) local zSphereNear = createColSphere ( x, y, z, 3 ) attachElements ( zSphere, zomb ) attachElements ( zSphereFar, zomb ) attachElements ( zSphereNear, zomb ) setElementData ( zSphere, 'shapeZomb', true ) setElementData ( zSphereFar, 'shapeZomb', true ) setElementData ( zSphereNear, 'shapeZomb', true ) setElementData ( zomb, "zombieShape", zSphere ) setElementData ( zSphere, "zombieShape", true ) setElementData ( zSphere, "zombieElement", zomb ) setElementData ( zomb, "shapeFar", zSphereFar ) setElementData ( zomb, "shapeNear", zSphereNear ) setElementData ( zSphereNear, "zShapeNear", true ) --setElementData ( zomb, "zombie", true ) --Нападає радіус не великий (ЗОМБИ) --setElementData ( zomb, "animal", true ) --Втікає радіус великий (ЗДОБИЧ) --setElementData ( zomb, "killer", true ) --Нападає радіус великий (ХИЩНИК) --setElementData ( zomb, "boss", true ) --Нападає радіус великий (БОСС) if ztype == 3 then setElementData ( zomb, "zombie", true ) setElementData ( zomb, "soldier", true ) setElementData(zomb, "blood", sold_blood) setElementData(zomb, "damage", sold_damage) setElementData(zomb, "speed", "sprint") elseif ztype == 2 then setElementData ( zomb, "zombie", true ) setElementData(zomb, "blood", fast_blood) setElementData ( zomb, "fast", true ) setElementData(zomb, "damage", fast_damage) setElementData(zomb, "speed", "run") --Тварини --Хищник elseif ztype == 4 then setElementData ( zomb, "killer", true ) setElementData(zomb, "blood", bear_blood) setElementData ( zomb, "bear", true ) setElementData(zomb, "damage", bear_damage) setElementData(zomb, "speed", "run") elseif ztype == 5 then setElementData ( zomb, "killer", true ) setElementData(zomb, "blood", wolf_blood) setElementData ( zomb, "wolf", true ) setElementData(zomb, "damage", wolf_damage) setElementData(zomb, "speed", "sprint") elseif ztype == 6 then setElementData ( zomb, "killer", true ) setElementData(zomb, "blood", fox_blood) setElementData ( zomb, "fox", true ) setElementData(zomb, "damage", fox_damage) setElementData(zomb, "speed", "sprint") --Здобич elseif ztype == 7 then setElementData ( zomb, "animal", true ) setElementData(zomb, "blood", animal_blood) setElementData(zomb, "damage", animal_damage) setElementData(zomb, "speed", "sprint") --Боси --Кровосос elseif ztype == 8 then setElementData ( zomb, "zombie", true ) setElementData ( zomb, "boss_blood", true ) setElementData(zomb, "blood", boss_blood_blood) setElementData(zomb, "damage", boss_blood_damage) setElementData(zomb, "speed", "sprint") setElementAlpha ( zomb, 5 ) --Всі боси elseif ztype == 9 then setElementData ( zomb, "zombie", true ) setElementData ( zomb, "boss_all", true ) setElementData(zomb, "blood", boss_all_blood) setElementData(zomb, "damage", boss_all_blood) setElementData(zomb, "speed", "sprint") elseif ztype == 10 then setElementData ( zomb, "zombie", true ) setElementData ( zomb, "pila", true ) setElementData(zomb, "blood", boss_all_blood) setElementData(zomb, "damage", boss_all_blood) setElementData(zomb, "speed", "run") applyStats(zomb) giveWeapon(zomb, 9, 9999, true) else setElementData ( zomb, "zombie", true ) setElementData(zomb, "blood", zomb_blood) setElementData(zomb, "damage", zomb_damage) setElementData(zomb, "speed", "run") end wentZombieToWalk ( zomb ) end end function wentZombieToWalk (zomb) if zomb then if isElement ( zomb ) then if not isPedDead ( zomb ) then if checkPlayersInView ( zomb ) then if not getElementData ( zomb, "target" ) and not getElementData ( zomb, 'rotating' ) then local rdmangle = math.random( 1, 359 ) setPedRotation( zomb, rdmangle ) setPedAnimation ( zomb, "PED", "WALK_fatold", -1, true, true, true) setTimer ( wentZombieToWalk, 10000, 1, zomb ) if getElementData ( zomb, "boss_blood" ) then setElementAlpha ( zomb, 5 ) end end else if isElement ( getElementData ( zomb, "zombieShape" ) ) then destroyElement ( getElementData ( zomb, "zombieShape" ) ) end if isElement ( getElementData ( zomb, "shapeFar" ) ) then destroyElement ( getElementData ( zomb, "shapeFar" ) ) end if isElement ( getElementData ( zomb, "shapeNear" ) ) then destroyElement ( getElementData ( zomb, "shapeNear" ) ) end local attaches = getAttachedElements ( zomb ) if attaches then for ElementKey, ElementValue in ipairs ( attaches ) do if isElement ( ElementValue ) then if not getElementData ( ElementValue, "zRadZone" ) then destroyElement ( ElementValue ) end end end end local creator = getElementData ( zomb, "creator" ) if isElement ( creator ) then setElementData ( creator, "spawnedzombies", ( getElementData ( creator, "spawnedzombies" ) or 1 ) - 1 ) end setElementData ( zomb, "target", false ) setElementData ( zomb, "rotating", nil ) if not getElementData ( zomb, "target" ) and not getElementData ( zomb, 'rotating' ) then local rdmangle = math.random( 1, 359 ) setPedRotation( zomb, rdmangle ) setPedAnimation ( zomb, "PED", "WALK_fatold", -1, true, true, true) setTimer ( wentZombieToWalk, 10000, 1, zomb ) if getElementData ( zomb, "boss_blood" ) then setElementAlpha ( zomb, 5 ) end end end end end end end function checkPlayersInView ( zomb ) local shapeFar = getElementData ( zomb, "shapeFar" ) if isElement(shapeFar) then if #getElementsWithinColShape ( shapeFar, 'player' ) == 0 then return false else return true end end end function zombieKilledPlayer (task) if getElementData ( source, "zombie" ) then if task[1] == "walkToPos" then if getElementData ( source, "rotating" ) then setElementRotation ( source, 0, 0, task[6] ) setTimer ( function ( zomb ) if isElement ( zomb ) then setElementData ( zomb, "rotating", false ); wentZombieToWalk ( zomb ) end end, 3000, 1, source ) end end if getElementData ( source, "target" ) then local diedPlayer = task[2] setElementData ( source, "target", nil ) wentZombieToWalk ( source ) end end end addEventHandler ( "npc_hlc:onNPCTaskDone", root, zombieKilledPlayer ) function killPlayerOfSick() for i, v in ipairs ( getElementsByType ("ped")) do if getElementData ( v, "zombie" ) then local target = getElementData ( v, "target" ) if target and target == source then setElementData ( v, "target", false ) exports.npc_hlc:clearNPCTasks(v) setTimer ( wentZombieToWalk, 3000, 1, v ) end end end end addEvent("killPlayerOfSick",true) addEventHandler("killPlayerOfSick",getRootElement(),killPlayerOfSick) function checkUnactiveZombies () for i, v in ipairs ( getElementsByType ("ped")) do if getElementData ( v, "zombie" ) then local target = getElementData ( v, "target" ) if target and not isElement ( target ) then setElementData ( v, "target", false ) wentZombieToWalk ( v ) end end end end setTimer (checkUnactiveZombies,10000,0)--600000 function zombieWasAttackedS ( zomb ) if not isPedDead ( zomb ) and not getElementData ( source, "isPlayerZombie" ) then setPedAnimation ( zomb ) if not exports.npc_hlc:isHLCEnabled ( zomb ) then exports.npc_hlc:enableHLCForNPC( zomb, getElementData ( zomb,"speed") or "sprint") end exports.npc_hlc:clearNPCTasks (zomb) exports.npc_hlc:addNPCTask ( zomb, {"killPed", source, 2, 2} ) setElementData ( zomb, "target", source ) setTimer ( wentZombieToWalk, 1000, 1, zomb ) end end addEvent( "zombieWasAttacked", true ) addEventHandler( "zombieWasAttacked", getRootElement(), zombieWasAttackedS ) function zombieHearedS ( zomb ) if isElement ( zomb ) then if not isPedDead ( zomb ) then if not getElementData ( zomb, "target" ) and not getElementData ( source, "zHeared" ) and not getElementData ( source, "isPlayerZombie" ) then setPedAnimation ( zomb ) if not exports.npc_hlc:isHLCEnabled ( zomb ) then exports.npc_hlc:enableHLCForNPC( zomb, getElementData ( zomb,"speed") or "sprint") end exports.npc_hlc:clearNPCTasks (zomb) setElementData ( zomb, "zHeared", source ) local x,y,z = getElementPosition ( source ) exports.npc_hlc:addNPCTask ( zomb, {"walkToPos", x, y, z, 2}) end end end end addEvent( "zombieHeared", true ) addEventHandler( "zombieHeared", getRootElement(), zombieHearedS ) function rotateZombieToPlayer ( rotation, x, y, z ) if not isPedDead ( source ) then if not getElementData ( source, "target" ) then setPedAnimation ( source ) if not exports.npc_hlc:isHLCEnabled ( source ) then exports.npc_hlc:enableHLCForNPC( source, getElementData ( source,"speed") or "sprint") end exports.npc_hlc:clearNPCTasks (source) exports.npc_hlc:addNPCTask ( source, {"walkToPos", x, y, z, 1, rotation}) end end end addEvent( "rotateZombieToPlayer", true ) addEventHandler( "rotateZombieToPlayer", getRootElement(), rotateZombieToPlayer ) function zombieNearLeave ( thePlayer ) if getElementType ( thePlayer ) == "player" and getElementData ( source, "zombieShape" ) then local zomb = getElementData ( source, "zombieElement" ) if isElement ( zomb ) and exports.npc_hlc:isHLCEnabled ( zomb ) then if getElementData ( zomb, "fast" ) then return true end local thistask = getElementData(zomb,"npc_hlc:thistask") if thistask then local task = getElementData(zomb,"npc_hlc:task."..thistask) if task then if task[1] == "killPed" and isElement ( task[2] ) then if task[2] == thePlayer then exports.npc_hlc:clearNPCTasks (zomb) setElementData(zomb,"target",false) wentZombieToWalk(zomb) end end end end end end end addEventHandler ( "onColShapeLeave", root, zombieNearLeave ) --Якшо вас замітив звір function PanicAnimals(zomb) if isElement(zomb) then local rdmangle = math.random( 1, 359 ) setPedRotation( zomb, rdmangle ) setPedAnimation ( zomb, "PED", "sprint_panic", -1, true, true, true) setTimer ( PanicAnimals, 20000, 1, zomb ) --Скільки біжить в один напрям end end function animalStopFollow(zomb) PanicAnimals(zomb) end addEvent("animalStopFollow",true) addEventHandler("animalStopFollow",getRootElement(),animalStopFollow) -- Thanks in advance ^^
-
Hi guys, i've got a problem with a hosted server. I mean, some players are able to connect and others are not, i mean they say it is "Conection timed out." Any help? Thanks in advance. Btw here's the ip :149.202.251.65:22003
-
Umm yea, that's a great idea, ill do it but, is there any script for the language menu? it would be a great start for me
-
Hi guys. I just opened a MTA DayZ Server ( In my language ) and i want to make a setting for english. ( i mean i have translated the inventory and everything ) Any ideas how to implement this script to translate everything? I think about adding a function in every script, for example, in the dayz inventory : if someone choosed english language, the inventory is shown in english, and so on for every script. Any ideas? Thanks in advance ^^