Jump to content

DKongHD

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by DKongHD

  1. Thanks, but I don't think, that i will release this...
  2. This is a small class/function that helps you to work with animations. So, if you want to create an animation, e.g. fading the alpha, you have to start the function like this: CEase:start(time, type) You should save the returned value/instance in a variable. You can get a list of all the animation types here:https://wiki.multitheftauto.com/wiki/Easing This are the "easing functions". To get the returned value, which is from 0 to 1 in the most cases, I make a little example for you: local myEase = CEase:start(1000, "InOutQuad") function renderSth() dxDrawRectangle(0, 0, 500, 500, tocolor(0, 0, 0, myEase.value*255)) end addEventHandler("onClientRender", getRootElement(), renderSth) With this small script, the alpha of the rectangle gets calculated from 0 to 255 in 1000 milliseconds. The returned value, that you have to use for the animations, you always get like this: variable.value. This script does not create animations, it just helps a lot at the calculating part. Here is the class/script: CEase = {} CEase.__index = CEase function CEase:start(time, typ) local data = {} data.start = getTickCount() data.ending = data.start+time data.typ = typ data.value = 0 setmetatable(data, self) data.easeFunc = function() local tick = getTickCount() local elapsed = tick-data.start local duration = data.ending - data.start local progress = elapsed / duration data.value = getEasingValue(progress, data.typ) if tick > data.ending then removeEventHandler("onClientRender", getRootElement(), data.easeFunc) end end addEventHandler("onClientRender", getRootElement(), data.easeFunc) return data end I hope I've explaned everything right. I think, all should work, because I've used the same class here: So if you want to have a lot of animations in your GUIs, this could help you a lot.
  3. You can send the files via triggerLatentClient to the client. Just read them out with fileRead and send the source to the client. On the client, just create the file, write the source into it and then you can load it for whatever you want.
  4. Do you mean something like this but just with an electric engine sound?
  5. Thanks I've uploaded a video from it to youtube:
  6. Looks nice, but why you create a timer for every file that gets downloaded? It would be easier with latent events.
  7. I created a youtube player for multi theft auto. You can search for a video. It shows you 20 result per page and you can easily jump to the next page or to the last lage. This player only plays the audio of the video. It gets the link from youtube, but for that, you need an external webserver with 2 PHP scripts. Otherwise, this script won't work. View the full image: http://i.imgur.com/F4i4k08.png I've uploaded a video from it to youtube:
×
×
  • Create New...