Jump to content

John Smith

Members
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by John Smith

  1. Thank you for helping out. 

    I have accidentally remembered that once in past (few months ago i guess or more) when i had Emsisoft Anti Malware installed, that it gave me BSOD when I'd launch MTA. At the moment of writing this topic, I had recently had installed Emsisoft again to do a scan, but forgot to uninstall it and it didn't appear in icon tray so i thought it wasn't running.

    After I uninstalled Emsisoft and rebooted my PC, MTA works normally again. Maybe some of Emsisoft's drivers collide with MTA. Anyway, I don't know if this is a big enough issue for MTA, but if there are other players running Emsisoft and MTA, they might run into same issue like I do. So according to this, only Emsisoft can fix this I believe, but whether you guys (MTA Team) want to tell Emsisoft that their software collides with yours, that is up to you guys.

    Anyway, thank you for spending time to help me out. I am lucky that it's not actually a hardware issue haha

  2. No problem.

    I have 2 sticks of RAM, and on either one of them it would give a BSOD. I must say that it is confusing to me how this can be a hardware issue as I don't get any BSOD anywhere else apart from MTA? What should/can I do right now? I know you said it's a hardware issue but could resetting/formatting windows help?

  3. Hello, when I launch MTA it gives BSOD (UNEXPECTED KERNEL MODE TRAP) right after when mta rectangle disappears (at the moment where it would open gta window)
    https://upload.mtasa.com/u/740930328/MTADiag-Log-2020-12-14_20-14-50.txt_

    Additional information: Only happens in MTA. Other games like GTA 5, Rocket League, Minecraft, even GTA:SA singleplayer work fine. I have been similarly having these bsod issues recently for a last few days after playing for few hours of GTA 5, and then I'd get the same thing where sound goes like bzzzzzzzzz and u get bsod. I am pretty confident it's connected with gpu driver.

    I tried updating gpu to latest version, and for GTA 5 it is gone (i think). But i haven't tried MTA on that older gpu version, however with the current one it crashes right on start like i described in beginning of the message. The only thing which i installed recently was Razer Synapse, but I don't think that's related. (I have AMD GPU drivers if that means something)

    • Sad 1
  4. Hi. After buying and installing a new GPU (AMD RX 580) I can no longer play MTA without it freezing 5 seconds after being in the menu.

    Some additional info:

    • GTA works if I delete GTA User Files and don't mess with some(?) setting(s), namely disabling framelimiter causes an instant issue where game actually works, but it's frozen in the current frame forever
    • Even if GTA works, mouse click support for it disappears after around a minute of playing. I do wanna note that some strange sound plays like 15 seconds prior to that (if I had to guess I'd say it's amd software center maybe because it had done something? idk)
    • Got MTA to work once with default GTA low settings, but after changing them to higher ones, the freeze issue comes
    • Before I got this GPU, I used integrated graphics in my current CPU, and it had it's own drivers. However, before installing my GPU and it's drivers, I had removed all Intel graphics drivers in Safe Mode with an utility program called Display Driver Uninstaller (from Guru3D), and afterwards I had installed newest graphics drivers from AMD
    • Tried other game to see if it's GPU issue (game: Heroes of Might and Magic III) and it worked fine
    • Tried reinstalling GTA and MTA, did not fix issue apart from reverting it to original settings on which it somewhat works (as specified above) but as soon as I want to change settings to anything humanlike normal, the freeze issue occurs

    https://pastebin.mtasa.com/739591873

    Thanks for reading

     

    edit: maybe this is related?
    https://community.amd.com/message/2945200

    edit2: this has been temporarily fixed by reverting to an older driver, seems to be the problem in adrenaline 2020

  5. Well since XP and Vista users are running a separate branch of MTA, their version would probably contain something along xp-vista in version information.

  6. Which key-based encryption to use? I tried looking up AES for Lua, but due to mta "wanting to be safe" it doesn't allow some of the functions which are required for it to work.
    How exactly do I implement encryption, and then decryption so that clients can decrypt it without them being able to compromise all encrypted files (since they'd know how to decrypt a key)?
    And what about salting, should I do it, how should I do it...
    Is there something better than AES which I could use?
    Should I make a PHP script so that it can return aes-encrypted script to server (to circumvent the issue of lua aes not working on mta)?

    Edit: what about https://github.com/thenuke321/Advanced-Lua-Encryption- ?

  7. Hi there.

    I gotta send script files from server to clients, and I'm not sure what would be the best way to make it secure (encryption, salting, hashing, how it would work, which ones to use, etc.) as at the moment they are being sent in plain text which is obviously insecure.

    I am sending them over triggerClientEvent function if that is important to this discussion.

  8. I must say, considering what type of multigamemode servers usually come up on this forum (ones with stolen and edited mgm scripts) I've expected that this one would be the same, but I've been so wrong.

    The server looks amazing, that's some great work, customization kinda reminds me of ER, but overall the design is pretty dope :D
    Only thing what I'd change a bit are the nametags, they look somewhat to FFS' one.

    Good luck with server!

    • Like 2
  9. Hello there. I am John Smith, also known as ZoeN. Today, I am here to offer my scripting services. Will they cost money? Yes. How much? I'll talk about it soon in this topic.

    Some info about me:
    I am an 18 year old guy from Croatia who has a particular interest in scripting on Multi Theft Auto. I've firstly started off back in 2014,
    going from simple Hello World scripts, to what I am today. A fully experienced MTA scripter with lots of experience and knowledge
    on how to do scripts, ranging from smaller projects to even bigger projects such as whole gamemodes and multigamemodes.

    What can I do?
    Basically anything. I've already done lots of resources. Examples would be:

    • Custom Race Gamemode
    • Custom Freeroam Gamemode
    • Custom Downloader (both for Freeroam and DM-like gamemodes)
    • Map Loader
    • Script Loader
    • Multigamemode
    • Login Panel
    • Punishment System
    • Userpanel
    • and many more which I haven't mentioned

    while I favour working on developing new gamemodes, let's be realistic that most customers won't come to me for that;  the center of my service are custom requests, which means you can ask me to script (or fix) anything you'd like, after which I will consider it and tell you if it's possible, and if so, suggest a price that can be further negotiated. I will start development, and you can test it out on my testserver before paying, so you can confirm it's in good working state and nothing from your requested features is missing. After the resource/code is sent, there'll be extended support for bugs that may appear after delivery, as I am pretty confident of my code's quality.

    How much do I charge?
    It really depends on lot of factors, such as complexity, time needed to do the job, and what you're asking me to do.

    For instance, smaller scripts would be in range of something like 5-10€, while
    bigger scripts would be in range of 10-30€, depending on their complexity.

    Finally, complete gamemodes (written from scratch) would be charged somewhat in this terms:

    • Small Gamemodes -- 50€
    • Big Gamemodes -- 100€+

    (for big gamemodes, that is a minimum price, however it may change to a higher one depending on what you're requesting, also based on complexity and time needed to complete the gamemode)

    Why are complete gamemodes so expensive?
    Well, because especially gamemodes takes some time, if not even a long time.
    Then, there's also the fact that the scripts which I'm creating are profesionally written and optimized, they're not amateur.

    Think of it as getting a tattoo on your body. You'd want the tattoo to be good and to still be fine even after years have passed right?
    You certainly don't want your tattoo to be made by an amateur and to have your tattoo fade away under 6 months.

    Any examples of my work?
    To be honest here, I haven't really made any public resources as I've always preferred to create private scripts (usually for my server(s)). I just have 1 public resource out there; https://community.multitheftauto.com/index.php?p=resources&s=details&id=14725

    To give you a sense of my code, let me quickly share the core of that resource (open spoiler);

    Spoiler
    
    -- -- This script also re-integrates the healthbar (MTA hardcoded to custom one) but with the same looks, cannot be noticed it's a new one. This is needed to overcome technical limitations.																																														
    
    -- Nametag Settings --
    local Nametags = {
    	showing = false;		-- don't touch this, it's already auto-enabled with onClientResourceStart (but if you change that you'll need to edit this variable)
    	font = "default-bold";		-- nametag font
    	shadow = true;			-- whether or not to make shadow of nametag's text (so that it can be seen in any environment)
    	showHealthbar = true;	-- whether or not to show health bar and armor bar
    	hpBarWidth = 122;		-- Max health bar width (132 because i think max nick length is 22 and dxGetTextWidth returns around 132 for that length)
    	hpBarHeight = 13;		-- Health bar height
    	scale = 1;				-- Font scale
    	shadowRecThickness = 6;	-- Thickness of shadow around healthbar
    	maxDistance = 10;		-- Distance at which nametag starts to fade out
    	adaptToTeam = true;		-- Should player's nametag color be changed to team's if player has a team?
    };
    
    
    function Player:GetNick() -- returns hexless nick
    	return self:getName():gsub("#%x%x%x%x%x%x", "");
    end
    
    function getPedMaxHealth(ped)
        -- Output an error and stop executing the function if the argument is not valid
        assert(isElement(ped) and (getElementType(ped) == "ped" or getElementType(ped) == "player"), "Bad argument @ 'getPedMaxHealth' [Expected ped/player at argument 1, got " .. tostring(ped) .. "]")
    
        -- Grab his player health stat.
        local stat = getPedStat(ped, 24)
    
        -- Do a linear interpolation to get how many health a ped can have.
        -- Assumes: 100 health = 569 stat, 200 health = 1000 stat.
        local maxhealth = 100 + (stat - 569) / 4.31
    
        -- Return the max health. Make sure it can't be below 1
        return math.max(1, maxhealth)
    end
    
    function dxDrawEmptyRectangle(startX, startY, endX, endY, color, width, postGUI)
    	dxDrawLine ( startX, startY, startX+endX, startY, color, width, postGUI )
    	dxDrawLine ( startX, startY, startX, startY+endY, color, width, postGUI )
    	dxDrawLine ( startX, startY+endY, startX+endX, startY+endY,  color, width, postGUI )
    	dxDrawLine ( startX+endX, startY, startX+endX, startY+endY, color, width, postGUI )
    end
    
    function IsColorcode(s)
    	local n = s:gsub("#%x%x%x%x%x%x", "");
    	if (#n) < (#s) then return true else return false end;
    end
    
    function Nametags.render()
    	
    	local bIgnoreDistance = false;
    	local people = {};
    
    	-- Check if we're aiming at someone, if yes, force the nametag to be shown
    	if localPlayer:getTargetStart() and localPlayer:getTargetEnd() and getKeyState("mouse2") then
    
    		local sx, sy, sz = getPedTargetStart(localPlayer);
    		local ex, ey, ez = getPedTargetEnd(localPlayer);
    		bIgnoreDistance, _, _, _, hitElement = processLineOfSight(sx, sy, sz, ex, ey, ez, false, true, true, false, false, true, false, true, localPlayer, false, false);
    		
    		-- Check if it's a player or is it a vehicle with players
    		if hitElement then
    			
    			if hitElement:getType() == "player" then
    				people[hitElement] = true;
    			
    			elseif hitElement:getType() == "vehicle" then
    				
    				-- get passengers if there are any
    				for _, v in pairs(getVehicleOccupants(hitElement)) do
    					people[v] = true;
    				end
    
    			end
    		end
    
    	end
    
    	for i, player in pairs(getElementsByType("player", nil, true)) do
    
    		local x, y, z = getPedBonePosition(player, 2);
    		local mx, my, mz = getCameraMatrix();
    		local distance = getDistanceBetweenPoints3D(mx, my, mz, x, y, z);
    
    		if player ~= localPlayer and ( distance <= 50 or people[player] == true) then
    
    			if isLineOfSightClear( mx, my, mz, x, y, z, true, false, false, true, false, false, false, localPlayer ) then
    
    				local additional_z = .20;
    				local X, Y = getScreenFromWorldPosition(x, y, z + additional_z);
    
    				if X and Y then
    
    					local text = Nametags.shadow and player:GetNick() or player:getName();
    					local texto = player:getName();
    
    					local r, g, b;
    				
    					local alpha = 175;
    					local font = IsColorcode(texto) and "default-bold" or "default";
    
    					-- Check for team
    					if player:getTeam() and Nametags.adaptToTeam then
    						r, g, b = player:getTeam():getColor();
    					else
    						r, g, b = player:getNametagColor();
    					end
    
    					-- Should we fade out? --
    					if distance >= Nametags.maxDistance and not bIgnoreDistance then
    
    						local leftover = distance - Nametags.maxDistance;
    						alpha = math.max(0, alpha - distance * (leftover/5));
    					
    					end
    
    					-- Draw player text --
    					dxDrawText(text, X - dxGetTextWidth(text, Nametags.scale, font), Y, X + dxGetTextWidth(text, Nametags.scale, font), Y, Nametags.shadow and tocolor(0, 0, 0, alpha) or tocolor(r, g, b, alpha), Nametags.scale, font, "center", "top", false, false, false, Nametags.shadow and false or true);
    
    					if Nametags.shadow then
    						dxDrawText(texto, X - dxGetTextWidth(texto, Nametags.scale, font) - 1, Y - 1, X + dxGetTextWidth(texto, Nametags.scale, font) - 1, Y - 1, tocolor(r, g, b, alpha), Nametags.scale, font, "center", "top", false, false, false, true);
    					end
    
    					-- Draw healthbar --
    					if Nametags.showHealthbar then
    
    						local fontHeight = dxGetFontHeight(Nametags.scale, font);
    						local distanceScaling = distance * 1.5;
    						local alpha2 = alpha - 150;
    						local alphaDivider = 255 / 150;
    
    						-- Alpha fix --
    						if alpha2 < 10 then
    							alpha2 = 0
    						end
    
    						-- If we are aiming from distance longer than fade distance then dont scale the rectangles --
    						if (bIgnoreDistance and distance > Nametags.maxDistance) or (distance > Nametags.maxDistance + (distance - Nametags.maxDistance)) then
    							distanceScaling = 0;
    							distance = 0;
    						end
    
    						local multiplier = Nametags.hpBarWidth / getPedMaxHealth(player);
    						local middleDistanceScale =  (  (X - Nametags.hpBarWidth / 2 + distanceScaling / 2 ) - (X - Nametags.hpBarWidth / 2)  ) / 2;
    						local colorMultiplier = 255 / getPedMaxHealth(player);
    						local armor = player:getArmor();
    						local divider = (10-(player:getHealth()/getPedMaxHealth(player))*8);
    
    						local recX = X - Nametags.hpBarWidth / 2 + middleDistanceScale;
    						local recY = Y + fontHeight + Nametags.shadowRecThickness * 2 - distanceScaling / 10;
    						local recWidth = math.max(player:getHealth() * multiplier - distanceScaling / divider, 1); -- distanceScaling / 10 makes it so low health doesnt 'decrease' when you get far away from player but it causes issue of full health getting out of healtbar, and distanceScaling / 2 makes it at full health to stay inside but on small health when you go away from player it looks like his health is lowering
    						local recHeight = Nametags.hpBarHeight - distanceScaling / 20;
    
    						-- Dead issue fix --
    						if player:getHealth() == 0 then
    							recWidth = 0;
    						end
    
    						-- Fix when player has 200hp eventho his max is 100, and fixes other impossible cases, this is actually more of a safeguard that health bar never gets out of its 'prison'
    						if recWidth > Nametags.hpBarWidth then
    							recWidth = Nametags.hpBarWidth - Nametags.shadowRecThickness;
    						end
    
    						dxDrawRectangle(recX - Nametags.shadowRecThickness, recY - Nametags.shadowRecThickness, Nametags.hpBarWidth + Nametags.shadowRecThickness * 2 - distanceScaling / 2, recHeight + Nametags.shadowRecThickness * 2, armor > 0 and tocolor(120, 120, 120, alpha) or tocolor(0, 0, 0, alpha));
    						dxDrawRectangle(recX, recY, Nametags.hpBarWidth - distanceScaling / 2, recHeight, tocolor(0, 0, 0, alpha));
    						dxDrawRectangle(recX, recY, Nametags.hpBarWidth - distanceScaling / 2, recHeight, tocolor(math.max(255 - player:getHealth() * colorMultiplier, 0), math.max(0 + player:getHealth() * colorMultiplier, 0), 0, alpha2));
    
    						dxDrawRectangle(recX, recY, recWidth, recHeight, tocolor(math.max(255 - player:getHealth() * colorMultiplier, 0), math.max(0 + player:getHealth() * colorMultiplier, 0), 0, alpha));
    
    					end
    
    				end
    
    			end
    
    		end
    
    	end
    
    end
    
    
    function Nametags:isShowing()
    	return Nametags.showing;
    end
    
    
    function Nametags:setShowing(bShowing)
    	if bShowing then
    		if not Nametags:isShowing() then
    			addEventHandler("onClientRender", root, Nametags.render);
    			Nametags.showing = true;
    		end
    	else
    		if Nametags:isShowing() then
    			removeEventHandler("onClientRender", root, Nametags.render);
    			Nametags.showing = false;
    		end
    	end
    end
    
    
    addEventHandler("onClientResourceStart", resourceRoot,
    	function()
    		
    		-- Disable nametags for everyone --
    		for _, player in pairs(getElementsByType("player")) do
    			player:setNametagShowing(false);
    		end
    
    		Nametags:setShowing(true);
    
    	end
    );
    
    addEventHandler("onClientPlayerJoin", root,
    	function()
    		source:setNametagShowing(false);
    	end
    );

     


    However, I did make a video about one project of mine, 3 years ago.


    You may also notice that there's a Level System and HUD, both developed by me, also 3 years ago.
    I was pretty good at scripting even back then, but at the current moment, I'm a beast :D

    How can you contact me?

    • Discord: ZoeN#4774
    • Private Message on this Forum

     

    Thank you for reading. If you have any questions regarding me and/or my services, contact me, and I'll reply to you as soon as I can.

    - John Smith (aka ZoeN)

    • Like 3
  10. Thank you man for replies. Didn't even know how these formats performed before. It's just making me sad that my designs can't be loaded correctly and scaled, they are very simple shapes made in Photoshop and they can be done in literally 30 seconds so there's no complexity in it whatsoever. The solutions of different formats such as dds with compressions like dxt5 are very useful and I'll take a good look on using them for images that don't require too much quality and images that would fit the power of two type of dimensions, however this one would look weird with power of two so I'll just look at the format how it operates but it won't fix my issue due to it needed power of two dimensions and not using them will lead to blurring i suppose?

    I've been scripting from 2013 and honestly I haven't seen such an issue like mine at any time. Could this be a bug in MTA's DirectX? I could give you a simple resource for reproducing this with my exact image if you'd like, I don't know would that help any of this because frankly I have 0 ideas why this is happening in first place and all I know is that images are definitely good, and even when i zoom them in right to the pixels the program which is zooming them doesn't have any distortions and shows the image correctly, unlike MTA.

    • Like 1
  11. 6 hours ago, IIYAMA said:

    To prevent the gray borders, save the image as >png8<.

     

    https://helpx.adobe.com/photoshop-elements/using/optimizing-images-gif-or-png.html

    As you have only white, you will not have problems with the color limitations of png8.

     

     

     

     

    Thank you that has solved it.
    However, what about images which have more colors? For instance, I can reproduce same issue I had with a rectangle which has glowing effect in a different color (when it's not PNG-8). However PNG-8 has 256 color limit, plus I need to convert all of them to that format which is a bit time wasting and reduces quality (of some) elements


    Why does this occur anyway? Does the color mode (8 bit, 16 bit, 32 bit) affect this? I've just noticed that all of those images were made in 8-bit Color Mode with Photoshop, haven't noticed that before, it must be the default setting or something, I'm guessing that if i rework the images in 16 bit color mode or in 32 bit color mode that this issue should go away?

    Edit: tried 32 bit color mode, still appears with black bordes when scaled...

  12. Hello. I've run into an issue where I'm having a big white button image and when i draw it smaller than it's original dimensions, it gets black borders.

    On these links below you can notice difference where first link is picture drawn in original image dimensions while second link is same width of image but with reduced height.

    original - http://prntscr.com/hvosi8
    scaled down - http://prntscr.com/hvos3y

    Now i do understand that when bigger images get scaled unproperly that it can lead to stretching and those sorts of problems but this image is 99.9% white pixels with just a little bit of white-ish bits on left and right side where button is being rounded (made circular)
    I've also attempted to scale the image properly, by just using width / 2, height / 2 of original image dimensions, so that it's scaled down correctly, but the issue always happens when image gets scaled down, it gets these annoying black borders.
     

    I'm wondering, is that normal thing to happen or it shouldn't happen? Because the image is 99.9% white, I'm gonna show you below how it looks like in pixels when fully zoomed in 
    http://prntscr.com/hvoy5a

    I hope you understood my words in this topic, as I've rushed them a bit. Thanks for reading.

    Edit: tried making the image even smaller, same thing happens, unless i do it in exactly the same dimensions which are needed in game, but if i wanna scale it, then rip

  13. Hello there.

    When you e.g setCameraMatrix to somewhere like thousands of meters from your original distance, the game takes up to 2-5 seconds to load all the objects in your streamed in radius.

    So I was wondering whether it's possible to determine when that loading has been finished, or to somehow make it load faster?

    Oh and https://wiki.multitheftauto.com/wiki/IsElementWaitingForGroundToLoad doesn't work for this case, tried it anyway but as I expected it didn't work as it wasn't intended for that.

    Thanks for reading.

  14. Probably because callback functions aren't called instantly, rather it waits for result, and after your function finishes that code, everything that was declared local inside of that function will be erased from memory automatically, thus making your local callback function non-existant and so you'll never recieve result from dbQuery

×
×
  • Create New...