Jump to content

AGENT_STEELMEAT

Members
  • Posts

    551
  • Joined

  • Last visited

Everything posted by AGENT_STEELMEAT

  1. There is no difference between that and his original code. His code should be working.
  2. Why on earth would you use a timer? -.- local sound = playSound("music.mp3", true) --This function adjusts the speed of the sound, every render, based on the local player's velocity. local function adjustSoundSpeed() --Remove this event handler is the sound is removed if not isElement(sound) then removeEventHandler("onClientRender", root, adjustSoundSpeed) return end --Determine whether or not to calculate the speed of the local player, or the vehicle he/she is in. local player = localPlayer if isPedInVehicle(player) then player = getPedOccupiedVehicle(player) end --Calculate the velocity of the local player local velX, velY, velZ = getElementVelocity(player) local velocity = (velX^2 + velX^2 + velX^2)^(0.5) --Calculate a reasonable speed local speed = --[[ ************* THIS IS UP TO YOU TO DO ****************]] setSoundSpeed(sound, speed) end addEventHandler("onClientRender", root, adjustSoundSpeed) That is a better solution. Note, however, that I've left it up to YOU to determine the speed based on the velocity, since you must decide the limits an such. Remember that speed must be between 0 and 1.
  3. Copying a wiki example I see... local screenWidth, screenHeight = guiGetScreenSize() local function drawAnimatedImage( ) local seconds = getTickCount() / 1000 local angle = math.sin(seconds) * 80 dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, 'YourImage.png', angle, 0, -120 ) end addEventHandler("onClientRender", root, drawAnimatedImage)
  4. https://community.multitheftauto.com/index.php?p= ... ls&id=2853 Copy of the scoreboard.
  5. Use a decent image host like imgur and maybe we can help. EDIT: Nevermind. Uninstall and delete your MTA:SA and GTA:SA folders, ensure all your drivers are up to date, and re-install. You may need to use windowed mode only.
  6. You sure creating a giant, non-damaging explosion behind the camera and maybe even continuing to create explosions for as long as needed won't give such an effect?
  7. No, element data is deleted when the element is destroyed, or if removeElementData() is called for the certain key. Elements are destroyed via destroyElement(), when a resource stops, or when all resources stop (server shutdown). Also keep in mind that when an element is destroyed, all it's children are destroyed as well.
  8. Use createExplosion (clientside).
  9. AGENT_STEELMEAT

    UNited

    All your clients must have the mod installed - then, you will have to disable all file checks. Then it should work.
  10. As Gandhi once said - "Imitation is the sincerest flattery".
  11. MTA's mysql system is faster and much simpler than ryden's module. Any function that might be missing can be scripted manually.
  12. AGENT_STEELMEAT

    An idea :)

    Already possible.
  13. Report them to their ISP's. Then they / their parents will be in legal trouble.
  14. Well, you tried, and had a good amount done. Here is a better example: local FPSLimit, lastTick, framesRendered, FPS = 36, getTickCount(), 0, 0 local screenWidth, screenHeight = guiGetScreenSize(); local width, height = screenWidth - 5, screenHeight - 5; screenWidth = nil; screenHeight = nil --This function calcuates the client's FPS and draws it on every render. local function clientRender() --Calculate the frames per second, based on the number of frames drawn in the last second. local currentTick = getTickCount() local elapsedTime = currentTick - lastTick if elapsedTime >= 1000 then FPS = framesRendered lastTick = currentTick framesRendered = 0 else framesRendered = framesRendered + 1 end --Draw the current FPS local FPSPercent = (255 * FPS) / FPSLimit local FPSColor = tocolor((255 - FPSPercent), FPSPercent, 0, 255) dxDrawText(tostring(FPS), 0, 0, width, height, FPSColor, 1, "bankgothic", "right") end addEventHandler("onClientRender", root, clientRender) --This function returns the current FPS function getFPS() return FPS end First, we declare some variables to store data for the calculation. We store the FPS limit (for the color of the actual text), the last tick (for measuring the elapsed time since the last update), the number of frames rendered since the last calculation, and lastly the actual FPS (defined to nil, but defined locally). Second, we calculate the margins for the text. Thirdly, we perform the actual calculation. If the time elapsed since the last frame update is equal to are greater than 1 second, then set our FPS counter to number of frames rendered in the last second. Then, reset the variables. Lastly, we draw the actual text, adding a nice colored effect (green for good FPS, red for bad). Hope this helps.
  15. Didn't really feel it was appropriate to do so in public - but I've pm'ed you his name since you were mentioned.
  16. So I woke up this morning, and noticed I got a PM. I was hoping I had offended someone and got a funny reaction, but got this: It's offers like this that make me want to punch a dolphin in the blowhole. Here is a line-by-line analysis of this atrocious literary turd. 2 - "light AND hard roleplay server": What is that supposed to mean? Isn't there a similar Katy Pery song? 3- "We got support from the MTA team and we will be at the official server list": ALL servers (that are configured correctly) are in the same server list. Not to mention, everybody has the same support here. 4 - "Recently one of our owners who is a great scripted quited Stanopolo": I had to read that twice - based on that I can't say I blame him. 5 - "gooooood scripter, I talked to benoxmen3..": 'good' only has two 'o's, and if your going to mention someone else's name, spell it right. 6 - "he said that I should ask you because you are a hell of a good scripter": God damn right I am. 7 - "I am waiting for an answer, now I gotta go to school, I hope I'll see and answer soon.": I hope for everyone's sake you are enrolled in some sort of English class. 8 - "By the way, you would be lead scritper and maybe owner!": That contradicts the first 'sentence' (I'm using that term loosely), as you said that you were the owner. Every time I get forum PMs I either get introduced the ignorant little kids like iToxiicz or impatient people like the team at SAMR. So yea, I'm going to decline.
  17. Peds can have control states. They use less BW, but IMHO using clientside peds synced manually would yield better results.
×
×
  • Create New...