Jump to content

arezu

Members
  • Posts

    446
  • Joined

  • Last visited

Everything posted by arezu

  1. Do you mean gray scale? if you look on the comments on that shader on the community, then you will find out how to make the black & white shader into gray scale.
  2. I never get this problem, but have you tried using it on both in server and client script?
  3. the latest stable version is 1.3.0. I tested your script Kenix but downloadFile didn't work, and the files were downloaded as normally before the script started.
  4. No. I just tested it on my server and it said that the function doesn't exist.
  5. isn't downloadFile for next version of MTA?
  6. arezu

    [DM]Vopic-Mesa

    the quality is not so bad if you choose 480p
  7. setElementData(player, "blabla", true) is almost the same as: local data = {} data[player] = {} data[player]["blabla"] = true with the exception that you can easily get access to the element data from any file (client and server side) and element data gets automatically removed when the element gets destroyed. setElementData can only be used on elements, and it sets a value for an unique string given by the player.
  8. arezu

    carfade issue

    go to line 74 in respawn_c.lua and change: local x, y = screen_width/2 - textWidth/2, screen_height * 0.75 - fontHeight/2 to: local x, y = screen_width/2 - textWidth/2, screen_height * 0.85 - fontHeight/2 or just experiment with the '0.85'.
  9. arezu

    carfade issue

    If you always want to hide other vehicles completely, then you should not use setElementAlpha because its the same as if the vehicles were there and it would be much better to set them to another dimension then players with bad computers would get the same fps as if they would only play by theirselves. Then in nametags script in race resource, check player dimension, and if same as player, only then should nametags be drawn. this is the one i used for my old server (only vehicle hider and carfade, not nametag hider) local MAX_DIST = 30 local MIN_DIST = 5 local MIN_ALPHA = 50 local carfade = false addEventHandler("onClientRender", getRootElement(), function() local camTarget = getCameraTarget() local tarVehicle = false if(camTarget == false)then return end if(getElementType(camTarget) == "vehicle")then tarVehicle = camTarget elseif(getElementType(camTarget) == "player")then tarVehicle = getPedOccupiedVehicle(camTarget) end if (camTarget == false or tarVehicle == false)then return end local posX, posY, posZ = getElementPosition(tarVehicle) local camX, camY, camZ = getCameraMatrix() local player = getElementsByType("player") for i = 1, #player do local vehicle = getPedOccupiedVehicle(player[i]) if(vehicle ~= tarVehicle and vehicle ~= false)then local alpha = 255 local x, y, z = getElementPosition(vehicle) local playerDist = getDistanceBetweenPoints3D(posX, posY, posZ, x, y, z) local camDist = getDistanceBetweenPoints3D(camX, camY, camZ, x, y, z) -- If distance is more or less than maximum and minimum values, then set alpha to minimum alpha. if(playerDist <= MIN_DIST or camDist <= MIN_DIST)then alpha = MIN_ALPHA end local alpha_dist = (playerDist/MAX_DIST) if(alpha_dist >= 0)then alpha = alpha_dist * 255 if(alpha > 255)then alpha = 255 end if(alpha < MIN_ALPHA)then alpha = MIN_ALPHA end end if(carfade == false or getElementModel(vehicle) == 425)then --alpha = 255 setElementDimension(player[i], getElementDimension(getLocalPlayer())) setElementDimension(vehicle, getElementDimension(getLocalPlayer())) if(getElementModel(vehicle) == 425)then alpha = 255 end else if(player[i] ~= getLocalPlayer())then if(getElementDimension(player[i]) ~= 5)then setElementDimension(vehicle, 5) setElementDimension(player[i], 5) for k, element in pairs(getAttachedElements(vehicle)) do if(getElementType(element) == "blip")then setElementDimension(element, getElementDimension(getLocalPlayer())) end end for k, element in pairs(getAttachedElements(player[i])) do if(getElementType(element) == "blip")then setElementDimension(element, getElementDimension(getLocalPlayer())) end end end end end local state = getElementData(player[i], "state") or false if(state == "dead")then alpha = 0 end setElementAlpha(vehicle, alpha) setElementAlpha(player[i], alpha) --setElementData(player[i], "carfade.alpha", alpha) end if(vehicle == tarVehicle and vehicle ~= false)then --setElementData(player[i], "carfade.alpha", 255) setElementAlpha(vehicle, 255) setElementAlpha(player[i], 255) setElementDimension(player[i], getElementDimension(getLocalPlayer())) setElementDimension(vehicle, getElementDimension(getLocalPlayer())) end end end) bindKey("F4", "up", function() carfade = (not carfade) if(carfade)then outputChatBox("#FFFFFF[ENABLE]#FF5500Vehicles are now #FF0000hidden!", 255, 128, 0, true) else outputChatBox("#FFFFFF[DISABLE]#FF5500Vehicles are now #00FF00visible, carfade has been#00FF00enabled!", 255, 128, 0, true) end end)
  10. arezu

    Client crashes

    my game crashes every day. Nothing new here.
  11. arezu

    Looking 4

    wrong at so many levels
  12. arezu

    [REL] dxGUI

    I was just working on making one like this... i'll continue anyways
  13. arezu

    script prob

    The guy above you posted the same thing...
  14. WOW ! , that works .. Thank you very much did it work when punching other players too (non-script created peds) ? i didn't test that.
  15. local power = 1 local powerUp = 0.5 addEventHandler("onClientPedDamage", getRootElement(), function(attacker) -- attacker == getLocalPlayer() because setElementVelocity is synced with server if(attacker and attacked ~= source and attacker == getLocalPlayer())then local aPosX, aPosY, aPosZ = getElementPosition(attacker) local sPosX, sPosY, sPosZ = getElementPosition(source) local angle = math.atan2(aPosX - sPosX, aPosY - sPosY) - math.rad(90) local velX, velY, velZ = getElementVelocity(source) setElementVelocity(source, velX + power*-math.cos(angle), velY + power*math.sin(angle), velZ + powerUp) end end) -- use this to test power addCommandHandler("fuu", function() local posX, posY, posZ = getElementPosition(getLocalPlayer()) local ped = createPed(16, posX, posY + 10, posZ) end)
  16. no, only interior (You can still set camera to different dimension, but you would have to change dimension for the player too so its not exactly what you are asking for). setCameraInterior(interior)
  17. http://bugs.mtasa.com/main_page.php
  18. arezu

    MySql help

    why dont you use mta's own official mysql functions? they are better. like this one: https://wiki.multitheftauto.com/wiki/DbConnect
  19. If you are trying to use for loop for animation, then you are on the wrong track. setTimer (function() guiProgressBarSetProgress(bar, guiProgressBarGetProgress(bar)+10) end, 1000, 0) maybe thats somewhat like what you are trying to do?
  20. Yeah, DFF and TXD. Also, i cant find cj_office.txd in my gta san andreas. Are you sure thats the correct name for the texture?
  21. It was only working some times for me, so i tried to also replace the dff for the model too at the same time, and now it works every time. I used IMGTool to extract the dff file for the model. (This problem only happens when trying to replace object texture).
  22. He is asking for a software with which you can get the x and y position of a point you select on your screen.
×
×
  • Create New...