Jump to content

codeluaeveryday

Members
  • Posts

    575
  • Joined

Everything posted by codeluaeveryday

  1. Funny that Cobra, I was just doing this now for my server and I was wondering the exact same question: viewtopic.php?f=91&t=66528&p=625620&hilit=MTA+Password+Encryption#p625620 ^^ This is the best I can help you with. It doesn't just use sha256, they salt it too.
  2. MTA I have been so grateful for the sha256 bit encryption, but I believe it's time we ask for these encryptions. I know these are all avaliable as modules made by Makabo: https://wiki.multitheftauto.com/wiki/Modules/SHA. Requested functions: sha1 (Most favoured for me) sha224 sha384 sha512 I still believe that MTA should add them. I require the sha1 function to connect to my SMF board. Cheers, Chris.
  3. I still agree with Mr ShariQ, but the main reason I completely hate this idea is because we need the MTA developers to focus on updating MTA, they don't have time to manage this other crap.
  4. WTF? Dude we are talking about the race gamemode, you have no idea what your on about, and you couldn't be anymore incorrect. Goodnight all.. Wauw, the award for biggest bitch goes to.... no not you. I've seen worse, but still. He didn't mention a shooting system in a race system, so ya. In fact, my answer would be right without knowing it is in a race gamemode. When a player dies in a car there is never a responsible element, this is why you attach a ped to the car and get the person who kill the ped. That's really all that's needed. Yes I am a bitch and I take full pride in it. Seriously stop replying, and how could you not know what the purpose of this resource is??? Oh wait you must not be as skilled as me I am fluent in pretty much every gamemode Except DD, my ping is too high, so it's unfair. @Keven, you can already add a projectile creator with the function, it sync's with element data anyway, a way to read it would be: getElementData(projectile, "creator")..
  5. WTF? Dude we are talking about the race gamemode, you have no idea what your on about, and you couldn't be anymore incorrect. Goodnight all..
  6. Sorry for the bump, just thought this may be useful, the first method I created and I am 100% sure of, is to use peds. When a ped dies (comits sucide) it gets the last known damage source and blames it. So we used a ped wasted event. Create peds, attach them to the vehicles, set the alpha to 0, and wait until they die. This was so accurate, we never encountered a issue with this method. This was my idea by the way.
  7. I'm not sure how high I was at the time, but I was almost certain that handling edits allow you to disable vehicle smoke, download hedit and check under handling / model flags...
  8. Off-topic: I've been trying really hard to learn spanish, so how was my post? I tried my best, and no I did not use a translator, I used my knowledge, I learn from books and iphone apps, I also learn from other people. Most days I'll sit in my server staring at everyone's spanish chats hoping to understand the nonsense, it's starting to sink through me.
  9. Hola, Yo hablo poco español, y disculpa mi español... createExplosion argument 3 es el Type: function createExplosionCommand (thePlayer, command) local x, y, z = getElementPosition ( thePlayer ) createExplosion ( x, y, z+2, 10 ) -- << 10 es theType end addCommandHandler("explosion", createExplosionCommand) https://wiki.multitheftauto.com/wiki/CreateExplosion ^^ Adios
  10. Required knowledge: cURL and fetchRemote post data. Ok, so I barely know anything about cURL, lets say I have this: curl -A 'Mandrill-Curl/1.0' -d '{"key":"example key","message":{"html":" Example HTML content<\/p>","text":"Example text content","subject":"example subject","from_email":"[email protected]","from_name":"Example Name","to":[{"email":"[email protected]","name":"Recipient Name","type":"to"}],"headers":{"Reply-To":"[email protected]"},"important":false,"track_opens":null,"track_clicks":null,"auto_text":null,"auto_html":null,"inline_css":null,"url_strip_qs":null,"preserve_recipients":null,"view_content_link":null,"bcc_address":"[email protected]","tracking_domain":null,"signing_domain":null,"return_path_domain":null,"merge":true,"global_merge_vars":[{"name":"merge1","content":"merge1 content"}],"merge_vars":[{"rcpt":"[email protected]","vars":[{"name":"merge2","content":"merge2 content"}]}],"tags":["password-resets"],"subaccount":"customer-123","google_analytics_domains":["example.com"],"google_analytics_campaign":"[email protected]","metadata":{"website":"www.example.com"},"recipient_metadata":[{"rcpt":"[email protected]","values":{"user_id":123456}}],"attachments":[{"type":"text\/plain","name":"myfile.txt","content":"ZXhhbXBsZSBmaWxl"}],"images":[{"type":"image\/png","name":"IMAGECID","content":"ZXhhbXBsZSBmaWxl"}]},"async":false,"ip_pool":"Main Pool","send_at":"example send_at"}' 'https://mandrillapp.com/api/1.0/messages/send.json' How would this ^^ work with mta's fetchRemote?
  11. It really depends on what your trying to do. I'd use a MySQL server for a custom account system just so it can be accessed outside of MTA, that way you could link it to your website. A house system may be used with sqlite. A SQLLite file saves records in a .db file, while a MySQL server is usually remote and not within MTA. It's really up to you, but most people will use SQLLite.
  12. Dude, why are you commenting?! It's not nearly impossible! They can make it, but seriously, MTA doesn't have the funds to host that many players, mta should work on a way to get more money.
  13. Not tested and I can't guarantee it works: local startx = 112 local starty = 1026 local startz = 14 local screenStartX = guiGetScreenSize() local SPECWIDTH = screenStartX local screenStartX = screenStartX * 0 local SPECHEIGHT = (SPECWIDTH / 16) * 7 -- height (changing requires palette adjustments too) local screenStartY = SPECHEIGHT / 2 local BANDS = 40 local use_dx = true local peakData, ticks, maxbpm, startTime, release, peak, peaks function reset ( ) peaks = {} for k=0, BANDS - 1 do peaks[k] = {} end peakData = {} ticks = getTickCount() maxbpm = 1 bpmcount = 1 startTime = 0 release = { } peak = 0 end addEventHandler("onClientResourceStart", root, function ( url ) if ( stream ) then destroyElement(stream) end -- Deal with sound stream = playSound("http://www.181.fm/winamp.pls?station=181-power&style=&description=Power%20181%20(Top%2040)&file=181-power.pls", false ) setSoundMinDistance(stream, 1) setSoundMaxDistance(stream, 10000) setTimer(setSoundPanningEnabled, 1000, 1, stream, false) startTicks = getTickCount() ticks = getTickCount() reset ( ) -- Deal with shaders -- Create shader shader_cinema, tec = dxCreateShader ( "texreptransform.fx" ) if not shader_cinema then return end -- If the image is too bright, you can darken it -- If the image is too bright, you can darken it dxSetShaderValue ( shader_cinema, "gBrighten", -0.25 ) -- Set the angle, grayscaled, rgb local radian=math.rad(0) dxSetShaderValue ( shader_cinema, "gRotAngle", radian ) dxSetShaderValue ( shader_cinema, "gGrayScale", 0 ) dxSetShaderValue ( shader_cinema, "gRedColor", 0 ) dxSetShaderValue ( shader_cinema, "gGrnColor", 0 ) dxSetShaderValue ( shader_cinema, "gBluColor", 0 ) -- Set image alpha (1 max) dxSetShaderValue ( shader_cinema, "gAlpha", 1 ) -- Set scrolling (san set negative and positive values) dxSetShaderValue ( shader_cinema, "gScrRig", 0) dxSetShaderValue ( shader_cinema, "gScrDow", 0) -- Scale and offset (don't need to change that) dxSetShaderValue ( shader_cinema, "gHScale", 1 ) dxSetShaderValue ( shader_cinema, "gVScale", 1 ) dxSetShaderValue ( shader_cinema, "gHOffset", 0 ) dxSetShaderValue ( shader_cinema, "gVOffset", 0 ) if not shader_cinema then outputChatBox( "Could not create shader. Please use debugscript 3" ) return else -- new render target slightly bigger tar = dxCreateRenderTarget ( SPECWIDTH, SPECHEIGHT ) -- reduce our width SPECWIDTH = SPECWIDTH - 6 -- Apply our shader to the drvin_screen texture engineApplyShaderToWorldTexture ( shader_cinema, "drvin_screen" ) end addEventHandler("onClientRender", root, function ( ) -- Get 2048 / 2 samples and return BANDS bars ( still needs scaling up ) local fftData = getSoundFFTData(stream, 2048, BANDS) -- get our screen size local w, h = guiGetScreenSize() -- if fftData is false it hasn't loaded if ( fftData == false ) then dxDrawText("Stream not loaded yet.", w-300, h-150) return end -- Draw a nice now playing thingy if ( getSoundMetaTags(stream).title ~= nil ) then local len = string.len(getSoundMetaTags(stream).title) dxDrawText("Now Playing: " .. getSoundMetaTags(stream).title, w-(270+(len*2)), h-150) else dxDrawText("Now Playing: -", w-(270), h-150) end -- Calculate our bars by the fft data calc ( fftData, stream ) end) end) -- Util stuff function timetostring ( input, input2 ) local minutes = input / 60 local seconds = input % 60 local minutes2 = input2 / 60 local seconds2 = input2 % 60 return string.format("%2.2i:%2.2i", minutes2, seconds2) end function avg ( num ) return maxbpm / bpmcount end function avg2 ( num1, num2, num ) return (num1+num2)/num end function round(num, idp) return tonumber(string.format("%." .. (idp or 0) .. "f", num)) end function getAverageBPM ( ) return maxbpm / bpmcount end function min ( num1, num2 ) return num1 <= num2 and num1 or num2 end function max ( num1, num2 ) return num1 >= num2 and num1 or num2 end function calc ( fft, stream ) -- Render to a render target and clear it dxSetRenderTarget( tar, true ) -- Set a random seed math.randomseed ( getTickCount ( ) ) -- Get our "Average" bpm local bpm = getSoundBPM ( stream ) if ( bpm == false or bpm == nil or bpm == 0 ) then bpm = 1 end local calced = {} local y = 0 local bC=0 local specbuf = 0 local w, h = guiGetScreenSize() local r,g,b = 0,0,0 local var = bpm + 37 -- use bpm to determine r,g,b though there are better ways of doing this. if ( var <= 56 ) then r,g,b = 99, 184, 255 end if ( var >= 57 and var < 83 ) then r,g,b = 238, 174, 238 end if ( var >= 83 and var < 146 ) then r,g,b = 238, 174, 238 end if ( var >= 146 and var < 166 ) then r,g,b = 99, 184, 255 end if ( var > 166 and var <= 200 ) then r,g,b = 238, 201, 0 end if ( var >= 200 ) then r,g,b = var, 0, 0 end local tags = getSoundMetaTags(stream) local bSpawnParticles = true if ( bpm <= 1 and getSoundBPM ( stream ) == false and getSoundPosition ( stream ) <= 20 ) then r,g,b = 255, 255, 255 dxDrawImage ( 0, 00, SPECWIDTH, SPECHEIGHT+100, "bg.png", 0, 0,0, tocolor(r, g, b, 255) ) dxDrawText(string.format("Learning...", bpm), screenStartX+10, screenStartY-30, screenStartX+10, screenStartY-30, tocolor(255, 255, 255, 255 ), 1.5, "arial") bSpawnParticles = false else -- always make this bigger because when you tint it the image will look smaller. local var = 600 local var2 = 400 dxDrawImage ( -var2, -var, SPECWIDTH+(var2*2), SPECHEIGHT+(var*2)+100, "bg.png", 0, 0,0, tocolor(r, g, b, 255) ) end local movespeed = (1 * (bpm / 180)) + 1 local dir = bpm <= 100 and "down" or "up" local prevcalced = calced -- loop all the bands. for x, peak in ipairs(fft) do local posx = x - 1 -- fft contains our precalculated data so just grab it. peak = fft [ x ] y=math.sqrt(peak)*3*(SPECHEIGHT-4); -- scale it (sqrt to make low values more visible) if (y > 200+SPECHEIGHT) then y=SPECHEIGHT+200 end -- cap it calced[x] = y y = y - 1 if ( y >= -1 ) then dxDrawRectangle((posx*(SPECWIDTH/BANDS))+10+screenStartX, screenStartY, 10, max((y+1)/4, 1), tocolor(r, g, b, 255 )) end if ( bSpawnParticles == true ) then for key = 0, 40 do if ( peaks[x][key] == nil ) then if ( #peaks[x] <= 20 and prevcalced[x] <= calced[x] and ( release[x] == true or release[x] == nil ) and y > 1 ) then local rnd = math.random(0, 0) peaks[x][key] = {} if ( dir == "up" ) then peaks[x][key]["pos"] = screenStartY else peaks[x][key]["pos"] = screenStartY+((y+1)/4) end peaks[x][key]["posx"] = (posx*(SPECWIDTH/BANDS))+12+screenStartX+(2-key) peaks[x][key]["alpha"] = 128 peaks[x][key]["dirx"] = 0 release[x] = false setTimer(function ( ) release[x] = true end, 100, 1) end else if ( bpm > 0 ) then local maxScreenPos = 290 local AlphaMulti = 255 / maxScreenPos value = peaks[x][key] if ( value ~= nil ) then local sX = value.posx dxDrawRectangle( value.posx, value.pos, 2, 2, tocolor(r, g, b, value.alpha)) value.pos = dir == "down" and value.pos + movespeed or value.pos - movespeed value.posx = value.posx + (movespeed <= 2 and math.random(-movespeed,movespeed) or math.random(-1, 1)) value.alpha = value.alpha - (AlphaMulti) - math.random(1, 4) if ( value.alpha <= 0 ) then peaks[x][key] = nil end end end end end end end if ( bSpawnParticles == true ) then dxDrawText(string.format((tags.artist ~= nil and tags.artist .. ", " or "") .."BPM: %i", bpm), screenStartX+10, screenStartY-30, screenStartX+20, screenStartY-30, tocolor(255, 255, 255, 255 ), 1.5, "arial") end dxDrawText(tags.title or tags.stream_name or "Unknown", screenStartX+10, screenStartY-60, screenStartX+10, screenStartY-60, tocolor(255, 255, 255, 255 ), 2, "arial") dxDrawText(timetostring(getSoundLength(stream), getSoundPosition(stream)), SPECWIDTH-50, screenStartY-40, SPECWIDTH-80, screenStartY-40, tocolor(255, 255, 255, 255 ), 1.5, "arial") dxSetRenderTarget() dxSetShaderValue ( shader_cinema, "gTexture", tar ) end
  14. I'm pretty sure this is all your wanted? local pHealth = getElementHealth(localPlayer) if pHealth > 100 then pHealth = pHealth / 2 end dxDrawRectangle(1107, 54, 211, 13, tocolor(0, 0, 0, 255), true) dxDrawRectangle(1108, 55, 209*(pHealth/100), 11, tocolor(255, 0, 0, 255), true)
  15. It is a really dumb idea, MTA will never go for this idea. MTA has a lot more than thousands of people... WTF? It would need a powerful host, the server would need to be able to handle all the players positions and the performance of the server barely even changes when they are bunched up! Mr Prestege is one of the biggest post count whores here, I really doubt he can be trusted... Lobby scripts are super easy to make! I don't even need to disagree with the idea, mta devs will never waste their time on this (Unless you pay for the lobby server hosting)
  16. I don't see a error in this part, it must be the trunkslate function: function kozosradio(thePlayer, commandName, ...) local theFrakcio = getPlayerTeam(thePlayer) if (theFrakcio) then local frakcioID = tonumber(getElementData(theFrakcio, "id")) if (frakcioID==1 or frakcioID==2 or frakcioID==3 or frakcioID == 4 or frakcioID == 5 or frakcioID == 6) then if (...) then local message = table.concat({...}) local PDFrakcio = getPlayersInTeam(thePlayer("Rendorség")) local OMSZFrakcio = getPlayersInTeam(getTeamFromName("Országos Mento Szolgálat")) local NNIFrakcio = getPlayersInTeam(getTeamFromName("Nemzeti Nyomozó Iroda")) local GOVFrakcio = getPlayersInTeam(getTeamFromName("Önkormányzat")) local NAVFrakcio = getPlayersInTeam(getTeamFromName("Nemzeti Adó Vámhivatal")) local playerName = getPlayerName(thePlayer) for key, value in ipairs(PDFrakcio) do outputChatBox("[#PD] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) end for key, value in ipairs(OMSZFrakcio) do outputChatBox("[#OMSZ] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) end for key, value in ipairs(NNIFrakcio) do outputChatBox("[#NNI] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) end for key, value in ipairs(GOVFrakcio) do outputChatBox("[#GOV] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) end for key, value in ipairs(NAVFrakcio) do outputChatBox("[#NAV] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) end end end end end addCommandHandler("d", kozosradio, false, false)
  17. Already been done I think: https://community.multitheftauto.com/index.php?p= ... ls&id=2730 but yeah shaders will do it.
  18. You are able to remove the crosshair texture using basic shaders and use lua to draw a sniper scope on the screen.
  19. Dude you gotta remember that a minigun's fire rate is very fast, and the original minigun damage is 140, 25 is still killable almost instantly. Use numbers below five, I'd prefer 2 over any other number: setWeaponProperty(38, "pro", "damage", 2) All you had to do was just trial and error it. It's not a hard thing to do.
  20. Mate, post this here: http://www.mtadayz.com/
  21. I know they will be released in MTA version 1.4, but I really need them now, the script i've been working on detects lots of things, and it requires regex. If MTA could, can you move these functions to a 1.3 version. I'd really love this.
  22. Have you even read the pricing? Some of us spend a lot of money on our current servers and we don't really want to blow money on that API. I use a few API's and in the near future I'll be using Google Graph API, but google translate is way to much. Our server/s use about 1.8 tb of data a month and our server's are constantly filled with players.
  23. Guy's ignore this post, he just messaged my on Skype, he's also gone to school. I'm fixing it for him right now, and yes there is a server-side.
×
×
  • Create New...