'LinKin Posted December 5, 2013 Posted December 5, 2013 Hello, As you know, it exists a script for making animations with an image. (i.e Hurry up! Image in Race) But I was wondering, if there's a way to apply animations like these to a text draw by dxDrawText. Seems impossible for me, but I want to make sure Thanks, LinKin. Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
ZL|LuCaS Posted December 5, 2013 Posted December 5, 2013 (edited) Hello,As you know, it exists a script for making animations with an image. (i.e Hurry up! Image in Race) But I was wondering, if there's a way to apply animations like these to a text draw by dxDrawText. Seems impossible for me, but I want to make sure Thanks, LinKin. "talk more about this animation(type animation)" Edited December 5, 2013 by Guest MTA Scripters. ♥♥♥Beijinhos♥♥♥
tosfera Posted December 5, 2013 Posted December 5, 2013 You can do that, on the client render you should use some math functions and if-statements to make the text size increase and decrease. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
codeluaeveryday Posted December 5, 2013 Posted December 5, 2013 You are also able to rotate text Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
'LinKin Posted December 5, 2013 Author Posted December 5, 2013 Uh, any example? Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Driggero Posted December 5, 2013 Posted December 5, 2013 If you're looking to move the text from one position to another, or one scale to another (anything you can edit about it really) then you can use interpolateBetween Combined with the several easing functions you can make all sorts of animations with this function
ZL|LuCaS Posted December 5, 2013 Posted December 5, 2013 Uh, any example? if you had paid attention to my question would already have your text with animation. MTA Scripters. ♥♥♥Beijinhos♥♥♥
Gallardo9944 Posted December 6, 2013 Posted December 6, 2013 Didn't test though. local x,y = guiGetScreenSize() local defScale = 1 local currentScale = defScale local maxScale = 3 local step = 0.3 -- How fast to change the size local turn = true -- true = increase size, false = decrease size local font = "default-bold" local text = "This texts pulses" function renderPulse() if turn == true then -- If we increase the value currentScale = currentScale + step if currentScale > maxScale then currentScale = maxScale turn = false -- Reached max? Then make it go back end else currentScale = currentScale - step if currentScale < defScale then currentScale = defScale turn = true end end local width = dxGetTextWidth(text,currentScale,font) local height = dxGetFontHeight(currentScale,font) dxDrawText(text,x/2-width/2,y/2-height/2,width,height,tocolor(255,255,255,255),currentScale,font) end addEventHandler("onClientRender",getRootElement(),renderPulse) Code Debugger - Minimalistic MTA debug line replacement
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now