Jump to content

Gallardo9944

Members
  • Posts

    442
  • Joined

  • Last visited

Everything posted by Gallardo9944

  1. element data is a very bad way for such thing as vehicle elements. You should use tables for that. Otherwise a hacker could create a custom vehicle and set it as the element data. Or set any existing one to its element data and own it.
  2. they don't work better than serverside ones, thus they can lower the impact on the server. The best way is to find a balance between using clientside and serverside functions.
  3. try moving some of the functions clientside so the server gets less impact.
  4. that depends on what you want and how you do it. Do you just create a ped and it provides a lag? Is there something you also do with the peds?
  5. tried. Failed. Try again. Scripting subforum is not a place to ask everyone to create something for you.
  6. what? Study and read wiki. Can't help you if you can't help yourself.
  7. @Solidsnake14, according to his explanation, he wants a video which starts playing when you start a new game in GTA (when CJ arrives at the airport, etc)
  8. nobody has an idea. It's not possible. Only if you create a sequence of images and draw them frame by frame.
  9. videos are not implemented in MTA.
  10. as far as i know, collisions are never scaled with the textures. You should change the model size in the 3D editor and import it then.
  11. here is an example (untested): local step = 0.05 -- Progress speed per frame (from 0 to 1.0) local x,y = guiGetScreenSize() -- get screen size local sx,sy = 400,300 -- predefining the size local px,py = x/2-sx/2,y -- middle of the screen by X, right behind the visible Y part. x/2-sx/2 stands for the middle of the screen. y means "after" the bottom screen edge local progress = 0 function renderWindow() progress = progress + step -- Increasing the progress each frame if progress > 1 then -- Progress can't be more than 1 so let's limit it progress = 1 end py = interpolateBetween(y,0,0,y/2-sy/2,0,0,progress,"OutBounce") -- Look for "easing" in wiki to change the animation type dxDrawRectangle(px,py,sx,sy,tocolor(0,0,0,170)) -- Rectangle as an example end addEventHandler("onClientRender",getRootElement(),renderWindow)
  12. check clientside part of race, it plays that sound when you finish a race by checkpoints.
  13. @Ursidae, what's the problem to read wiki for the event?
  14. @xXMADEXx, if the server has enough network speed, there won't be any lag cause latent events don't block main traffic thus not touching the main thread. So that relies only on host's network bandwidth.
  15. add a simple check in the click event: addEventHandler( "onClientGUIClick", button, function () if not fileExists(images[curIndex]) then curIndex = 1 else curIndex = curIndex + 1 end end
  16. Sure. Study it. Scripting subforum is not a request box.
  17. Huh, there is one. https://wiki.multitheftauto.com/wiki/OnColShapeLeave
  18. KRZO, please, if you don't understand it, don't try to help. It's going to be even worse.
  19. because you're using absolute values. You have to use relative ones, e.g. bX/10, etc, etc, etc
  20. We aren't assisting with maps here. And yes, please, make your topic names more informative.
  21. local x,y = guiGetScreenSize() local text = "My n*gga, my n*gga..." local scale = 2 local length = dxGetTextWidth(text,scale,"default-bold") local height = dxGetFontHeight(scale,"default-bold") function renderText() dxDrawText(text,x/2-length/2,y/2-height/2,x,y,tocolor(255,255,255,255),scale,"default-bold") -- centered text end addEventHandler("onClientRender",getRootElement(),renderText) EDIT: found a small mistake. Changed it.
  22. it's not about maps with compiled stuff but with loading a custom DLL into GTA memory (MTA uses GTA so...). So loading a custom code would be possible with unsecure loadstrings.
×
×
  • Create New...