Jump to content

WASSIm.

Members
  • Posts

    1,410
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by WASSIm.

  1. Explain us what are u working for so we can help u about it
  2. I use the the second code
  3. Hi #,xiRocKyz sorry but your code complicated and is wrong its shows everything wrong on list anyway i fixed it and thank for your help
  4. Hi guys i am back for long time, i working for top 20 players like top player have high level and much money i hope help me for this errors 1) Its show all players not only 20 2) Its make server laggy so much when start resource or on select type of list 3) Got ERROR: Aborting infinite running script ZA-info when start resource 4) Some time got table nil Server side local statsList = { {"level", "Level", "lvl"}, {"money", "Money", "$"}, {"playTime", "Play Time"}, {"kills", "Kills"}, {"deaths", "Deaths"}, {"zombieKills", "Zombie Kills"}, {"bossKills", "Boss Kills"} } addEventHandler("onResourceStart", resourceRoot, function() for i, list in ipairs(statsList) do local key = list[1] local accounts = getAccounts() local playerList = {} for i, account in ipairs(accounts) do local data = exports["ZA-account"]:getAccountData(account, key) local name = exports["ZA-account"]:getAccountData(account, "nick") if (data and tonumber(data)) then table.insert(playerList, {name, tonumber(data)}) --outputDebugString("Name: "..name.. " / "..key..": "..data or "N/A") end end table.sort(playerList, function(a, b) return a[2] > b[2] end) for i=20, #playerList do table.remove(playerList, i) end statsList[i][4] = playerList end end) addEvent("onPlayerOpenTopPanel", true) addEventHandler("onPlayerOpenTopPanel", root, function( ) triggerClientEvent(source, "onClientPlayerOpenTopPanel", source, statsList) end) Thanks for help! NB: I edited this topic
  5. You can use XML function its more easy: https://wiki.multitheftauto.com/wiki/XML
  6. WASSIm.

    speedometer

    1) Your function is wrong 2) You need to use DX functions
  7. First you need to move your topic to Scripting section, You can use OnClientClick & OnClientCursorMove
  8. I don't think if you can
  9. You can use onClientKey and cancelEvent
  10. Will be better if make top 20 server position with other color
  11. Look at example: https://wiki.multitheftauto.com/wiki/DxDrawCircle function dxDrawRoundedRectangle(x, y, rx, ry, color, radius) rx = rx - radius * 2 ry = ry - radius * 2 x = x + radius y = y + radius if (rx >= 0) and (ry >= 0) then dxDrawRectangle(x, y, rx, ry, color) dxDrawRectangle(x, y - radius, rx, radius, color) dxDrawRectangle(x, y + ry, rx, radius, color) dxDrawRectangle(x - radius, y, radius, ry, color) dxDrawRectangle(x + rx, y, radius, ry, color) dxDrawCircle(x, y, radius, 180, 270, color, color, 7) dxDrawCircle(x + rx, y, radius, 270, 360, color, color, 7) dxDrawCircle(x + rx, y + ry, radius, 0, 90, color, color, 7) dxDrawCircle(x, y + ry, radius, 90, 180, color, color, 7) end end dxDrawRoundedRectangle(350, 50, 100, 100, tocolor(0, 255, 0, 255), 20)
  12. Hey guys, Zombie Attack is back again! with a better version the story is that you must kill zombies and bosses to earn experience and get some cash and you level up! Besides, by the level you earn, you can choose many classes to select and spawn like Resistances or Military Forces you will have some powerful vehicles like Hydra, Rhino.. etc Also, you can create your own group or squad and create a base to protect it from the non-members By the way, you can find the bosses to kill them! they are so strong and hard to kill like The Nemesis, and The Licker ( From Resident Evil ) And more other features like Vehicles System or Viruses.. etc Enjoy your stay out there! Features: Account System Chat System Group System Hud System Maps System Mods System Settings & Shader System Shop & Vehicle System Boss's & Zombies System Airdrops & Airbombs Redcross Area (Turfing) Pictures: 1.0.0v Pictures: 1.2.0v Server Adress: mtasa://51.68.124.221:22004 (CLICK TO JOIN TO SERVER )
  13. You need to be good on scripting to do this
  14. Habet post houni https://forum.multitheftauto.com/forum/83-client/
  15. Hi guys will make TUT for cover radar.txd to taxture.. 1) Exports all radar pictures 2) Create meta.xml <meta> <info author="WASSIm." name="Radar cover" version="1.0.0" type="script" description="TUT Radar cover" /> <script src="client.lua" type="client" /> <file src="images/radar00.bmp" /> <file src="images/radar01.bmp" /> <file src="images/radar02.bmp" /> <file src="images/radar03.bmp" /> <file src="images/radar04.bmp" /> <file src="images/radar05.bmp" /> <file src="images/radar06.bmp" /> <file src="images/radar07.bmp" /> <file src="images/radar08.bmp" /> <file src="images/radar09.bmp" /> <file src="images/radar10.bmp" /> <file src="images/radar11.bmp" /> <file src="images/radar12.bmp" /> <file src="images/radar13.bmp" /> <file src="images/radar14.bmp" /> <file src="images/radar15.bmp" /> <file src="images/radar16.bmp" /> <file src="images/radar17.bmp" /> <file src="images/radar18.bmp" /> <file src="images/radar19.bmp" /> <file src="images/radar20.bmp" /> <file src="images/radar21.bmp" /> <file src="images/radar22.bmp" /> <file src="images/radar23.bmp" /> <file src="images/radar24.bmp" /> <file src="images/radar25.bmp" /> <file src="images/radar26.bmp" /> <file src="images/radar27.bmp" /> <file src="images/radar28.bmp" /> <file src="images/radar29.bmp" /> <file src="images/radar30.bmp" /> <file src="images/radar31.bmp" /> <file src="images/radar32.bmp" /> <file src="images/radar33.bmp" /> <file src="images/radar34.bmp" /> <file src="images/radar35.bmp" /> <file src="images/radar36.bmp" /> <file src="images/radar37.bmp" /> <file src="images/radar38.bmp" /> <file src="images/radar39.bmp" /> <file src="images/radar40.bmp" /> <file src="images/radar41.bmp" /> <file src="images/radar42.bmp" /> <file src="images/radar43.bmp" /> <file src="images/radar44.bmp" /> <file src="images/radar45.bmp" /> <file src="images/radar46.bmp" /> <file src="images/radar47.bmp" /> <file src="images/radar48.bmp" /> <file src="images/radar49.bmp" /> <file src="images/radar50.bmp" /> <file src="images/radar51.bmp" /> <file src="images/radar52.bmp" /> <file src="images/radar53.bmp" /> <file src="images/radar54.bmp" /> <file src="images/radar55.bmp" /> <file src="images/radar56.bmp" /> <file src="images/radar57.bmp" /> <file src="images/radar58.bmp" /> <file src="images/radar59.bmp" /> <file src="images/radar60.bmp" /> <file src="images/radar61.bmp" /> <file src="images/radar62.bmp" /> <file src="images/radar63.bmp" /> <file src="images/radar64.bmp" /> <file src="images/radar65.bmp" /> <file src="images/radar66.bmp" /> <file src="images/radar67.bmp" /> <file src="images/radar68.bmp" /> <file src="images/radar69.bmp" /> <file src="images/radar70.bmp" /> <file src="images/radar71.bmp" /> <file src="images/radar72.bmp" /> <file src="images/radar73.bmp" /> <file src="images/radar74.bmp" /> <file src="images/radar75.bmp" /> <file src="images/radar76.bmp" /> <file src="images/radar77.bmp" /> <file src="images/radar78.bmp" /> <file src="images/radar79.bmp" /> <file src="images/radar80.bmp" /> <file src="images/radar81.bmp" /> <file src="images/radar82.bmp" /> <file src="images/radar83.bmp" /> <file src="images/radar84.bmp" /> <file src="images/radar85.bmp" /> <file src="images/radar86.bmp" /> <file src="images/radar87.bmp" /> <file src="images/radar88.bmp" /> <file src="images/radar89.bmp" /> <file src="images/radar90.bmp" /> <file src="images/radar91.bmp" /> <file src="images/radar92.bmp" /> <file src="images/radar93.bmp" /> <file src="images/radar94.bmp" /> <file src="images/radar95.bmp" /> <file src="images/radar96.bmp" /> <file src="images/radar97.bmp" /> <file src="images/radar98.bmp" /> <file src="images/radar99.bmp" /> <file src="images/radar100.bmp" /> <file src="images/radar101.bmp" /> <file src="images/radar102.bmp" /> <file src="images/radar103.bmp" /> <file src="images/radar104.bmp" /> <file src="images/radar105.bmp" /> <file src="images/radar106.bmp" /> <file src="images/radar107.bmp" /> <file src="images/radar108.bmp" /> <file src="images/radar109.bmp" /> <file src="images/radar110.bmp" /> <file src="images/radar111.bmp" /> <file src="images/radar112.bmp" /> <file src="images/radar113.bmp" /> <file src="images/radar114.bmp" /> <file src="images/radar115.bmp" /> <file src="images/radar116.bmp" /> <file src="images/radar117.bmp" /> <file src="images/radar118.bmp" /> <file src="images/radar119.bmp" /> <file src="images/radar120.bmp" /> <file src="images/radar121.bmp" /> <file src="images/radar122.bmp" /> <file src="images/radar123.bmp" /> <file src="images/radar124.bmp" /> <file src="images/radar125.bmp" /> <file src="images/radar126.bmp" /> <file src="images/radar127.bmp" /> <file src="images/radar128.bmp" /> <file src="images/radar129.bmp" /> <file src="images/radar130.bmp" /> <file src="images/radar131.bmp" /> <file src="images/radar132.bmp" /> <file src="images/radar133.bmp" /> <file src="images/radar134.bmp" /> <file src="images/radar135.bmp" /> <file src="images/radar136.bmp" /> <file src="images/radar137.bmp" /> <file src="images/radar138.bmp" /> <file src="images/radar139.bmp" /> <file src="images/radar140.bmp" /> <file src="images/radar141.bmp" /> <file src="images/radar142.bmp" /> <file src="images/radar143.bmp" /> </meta> 3) Create client.lua (Script) addEventHandler("onClientResourceStart", resourceRoot, function () local texture = dxCreateRenderTarget(6144, 6144) local radars, count = {}, 0 for i=0, 143 do local id = i <10 and "0" or "" radars[i] = dxCreateTexture("images/radar"..id..i..".bmp") dxSetRenderTarget(texture) local width, height = dxGetMaterialSize(radars[i]) dxDrawImage(width*count, height*(math.floor(i/12)), width, height, radars[i]) count = count == 11 and 0 or count+1 end dxSetRenderTarget( ) local pixel = dxGetTexturePixels(texture) local pixels = dxConvertPixels(pixel, 'png') local file = fileCreate("radar.png") fileWrite(file, pixels) fileClose(file) end 4) And you will get this full map
  16. Chof wiki https://wiki.multitheftauto.com/wiki/Anti-cheat_guide Code for <enablesd> Displayed on detect Required server version Required <minclientversion> Notes 16 SD #16 1.3.1-9.05097 1.3.1-9.05097 Disallow disabled anti-cheat components. This is triggered when an anti-cheat component can not start. It is usually due to some problem with the PC and might be fixed by a reboot. Can also be triggered by a virus.
  17. First remove your code en Scoreboard Client then change level to Level en setElementData
  18. WASSIm.

    Vehicle hud

    local sX,sY = guiGetScreenSize() lcoal x, y, w, h = sX, sY, 30, 250 local max = (math.floor(getVehicleHandling(vehicle)["maxVelocity"])*3.6) exports.USCmisc:DxDrawBorderedRectangle(x-h-50, y-200, w, h*(mph/(max*1.49)), tocolor(145, 0, 0, 255), 2) You need to work like this
  19. So i need do this ?? -- Create zombies closed randomly players local pacecount = 0 while pacecount < 5 do --4 ZOMBIES AT A TIME TO PREVENT FPS DROP local tzombiecount = #everyZombie+pacecount if (tzombiecount < ZombieLimit) then local thePlayer = getRandomPlayer() if (thePlayer) and (exports["ZA-system"]:isPlayerLogin(thePlayer)) and not (getElementData(thePlayer, "zombieProof")) and not (isPedDead(thePlayer)) then local disc, angle = math.random(15, 50), math.random(360) local gx, gy = getDistanceRotation(0, 0, disc, angle) if not (hasPositionZombieProof(gx, gy)) then triggerClientEvent(thePlayer, "onClientPreZombieSpawn", thePlayer, gx, gy) pacecount = pacecount+1 end end end pacecount = pacecount+1 end
  20. Now is it and server freezed [2017-02-05 22:06:55] ADMIN: Resource 'ZA-zombies' started by ZA|WASSIm.(wassmas) [2017-02-05 22:06:56] INFO: :ZA-zombies/server.lua: Successfully compiled [2017-02-05 22:07:00] INFO: 0 [2017-02-05 22:07:00] INFO: 1 [2017-02-05 22:07:05] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:06] INFO: 0 [DUP x8187] [2017-02-05 22:07:06] INFO: 1 [DUP x8187] [2017-02-05 22:07:06] INFO: 0 [2017-02-05 22:07:06] INFO: 1 [2017-02-05 22:07:10] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:12] INFO: 0 [DUP x9581] [2017-02-05 22:07:12] INFO: 1 [DUP x9581] [2017-02-05 22:07:12] INFO: 0 [2017-02-05 22:07:12] INFO: 1 [2017-02-05 22:07:12] INFO: 0 [2017-02-05 22:07:15] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:18] INFO: 1 [DUP x9524] [2017-02-05 22:07:18] INFO: 0 [DUP x9524] [2017-02-05 22:07:18] INFO: 1 [2017-02-05 22:07:18] INFO: 0 [2017-02-05 22:07:18] INFO: 1 [2017-02-05 22:07:20] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:24] INFO: 0 [DUP x9612] [2017-02-05 22:07:24] INFO: 1 [DUP x9612] [2017-02-05 22:07:24] INFO: 0 [2017-02-05 22:07:24] INFO: 1 [2017-02-05 22:07:24] INFO: 0 [2017-02-05 22:07:25] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:30] INFO: 1 [DUP x9586] [2017-02-05 22:07:30] INFO: 0 [DUP x9586] [2017-02-05 22:07:30] INFO: 1 [2017-02-05 22:07:30] INFO: 0 [2017-02-05 22:07:30] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:35] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:36] INFO: 1 [DUP x9705] [2017-02-05 22:07:36] INFO: 0 [DUP x9705] [2017-02-05 22:07:36] INFO: 1 [2017-02-05 22:07:36] INFO: 0 [2017-02-05 22:07:36] INFO: 1 [2017-02-05 22:07:40] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:42] INFO: 0 [DUP x9625] [2017-02-05 22:07:42] INFO: 1 [DUP x9625] [2017-02-05 22:07:42] INFO: 0 [2017-02-05 22:07:42] INFO: 1 [2017-02-05 22:07:42] INFO: 0 [2017-02-05 22:07:45] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:48] INFO: 1 [DUP x9708] [2017-02-05 22:07:48] INFO: 0 [DUP x9708] [2017-02-05 22:07:48] INFO: 1 [2017-02-05 22:07:48] INFO: 0 [2017-02-05 22:07:48] INFO: 1 [2017-02-05 22:07:50] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:54] INFO: 0 [DUP x9644] [2017-02-05 22:07:54] INFO: 1 [DUP x9644] [2017-02-05 22:07:54] INFO: 0 [2017-02-05 22:07:54] INFO: 1 [2017-02-05 22:07:54] WARNING: Long execution (ZA-zombies) [2017-02-05 22:07:59] WARNING: Long execution (ZA-zombies) [2017-02-05 22:08:00] INFO: 0 [DUP x9702] [2017-02-05 22:08:00] INFO: 1 [DUP x9702] [2017-02-05 22:08:00] INFO: 0 [2017-02-05 22:08:00] INFO: 1 [2017-02-05 22:08:00] INFO: 0 [2017-02-05 22:08:04] WARNING: Long execution (ZA-zombies) [2017-02-05 22:08:06] INFO: 1 [DUP x9605] [2017-02-05 22:08:06] INFO: 0 [DUP x9605] [2017-02-05 22:08:06] INFO: 1 [2017-02-05 22:08:06] INFO: 0 [2017-02-05 22:08:06] INFO: 1 [2017-02-05 22:08:09] WARNING: Long execution (ZA-zombies) [2017-02-05 22:08:12] INFO: 0 [DUP x9606] [2017-02-05 22:08:12] INFO: 1 [DUP x9606] [2017-02-05 22:08:12] INFO: 0 [2017-02-05 22:08:12] INFO: 1 [2017-02-05 22:08:12] INFO: 0 [2017-02-05 22:08:14] WARNING: Long execution (ZA-zombies) [2017-02-05 22:08:18] INFO: 1 [DUP x9527] [2017-02-05 22:08:18] INFO: 0 [DUP x9527] [2017-02-05 22:08:18] INFO: 1 [2017-02-05 22:08:18] INFO: 0 [2017-02-05 22:08:18] WARNING: Long execution (ZA-zombies) [2017-02-05 22:08:23] WARNING: Long execution (ZA-zombies) [2017-02-05 22:08:24] INFO: 1 [DUP x9555] [2017-02-05 22:08:24] INFO: 0 [DUP x9555] [2017-02-05 22:08:24] INFO: 1 [2017-02-05 22:08:24] INFO: 0
  21. addEvent("onCheckZombie", true ) addEventHandler("onCheckZombie", root, function () -- Create zombies closed randomly players local pacecount = 0 while pacecount < 5*2 do --4 ZOMBIES AT A TIME TO PREVENT FPS DROP local tzombiecount = #everyZombie+pacecount if (tzombiecount < ZombieLimit) then local thePlayer = getRandomPlayer() if (thePlayer) and (exports["ZA-system"]:isPlayerLogin(thePlayer)) and not (getElementData(thePlayer, "zombieProof")) and not (isPedDead(thePlayer)) then local disc, angle = math.random(15, 50), math.random(360) local gx, gy = getDistanceRotation(0, 0, disc, angle) if not (hasPositionZombieProof(gx, gy)) then triggerClientEvent(thePlayer, "onClientPreZombieSpawn", thePlayer, gx, gy) pacecount = pacecount+1 end end end end -- Delete far away zombies local allplayers, listCloseZ = getElementsByType("player"), {} for ZombKey,theZomb in ipairs(everyZombie) do if (isZombie(theZomb)) and not (getElementData(theZomb, "forcedtoexist")) then local Zx, Zy, Zz = getElementPosition(theZomb) for _,thePlayer in ipairs(allplayers) do if (exports["ZA-system"]:isElementInRange(thePlayer, Zx, Zy, Zz, 75)) and not (listCloseZ[theZomb]) then listCloseZ[theZomb] = true end end if not (listCloseZ[theZomb]) then destroyElement(theZomb) end end end end)
×
×
  • Create New...