AL-SAYED Posted December 20, 2012 Share Posted December 20, 2012 شلون استخدم ذلين؟؟؟؟؟ guiGetAlpha guiSetAlpha ---------------------- guiSetSize guiGetSize Link to comment
Mr.T9 Posted December 20, 2012 Share Posted December 20, 2012 اضغط على كل وظيفة بيجيك مثال Link to comment
AL-SAYED Posted December 20, 2012 Author Share Posted December 20, 2012 ادش على الارقمنت مافهم شي float guiGetAlpha ( element guiElement ) FLOAT وش معناها bool guiSetAlpha ( element guielement, float alpha ) BOOLوش معناها Link to comment
AhmadQTR Posted December 20, 2012 Share Posted December 20, 2012 ما عليك من FLOAT بس اكتب الاشياء الاساسيه و خلاص Link to comment
|Mr|-Talal07-| Posted December 20, 2012 Share Posted December 20, 2012 (edited) خذ هذا مثال من عندي function open() if guiGetAlpha(wnd) == 1 then setTimer(guiSetAlpha,500,10,wnd,guiGetAlpha(wnd) - 0.1) setTimer(showCursor,5000,1,false) elseif ( guiGetAlpha(wnd) == 0 ) then setTimer(guiSetAlpha,500,10,wnd,guiGetAlpha(wnd) + 0.1) setTimer(showCursor,5000,1,true) end end bindKey("F2","down",open) ما جربته شوف انت Edited December 20, 2012 by Guest Link to comment
|Mr|-Talal07-| Posted December 20, 2012 Share Posted December 20, 2012 توي عدلت عليه + اكتب ذا تحت النافذه guiSetAlpha(wnd,0) و غير wnd الى اسم النافذه في ذا الكود و السابق Link to comment
AL-SAYED Posted December 20, 2012 Author Share Posted December 20, 2012 GUIEditor = { button = {}, staticimage = {}, window = {}, } win1 = guiCreateWindow(242, 106, 695, 563, "FREE CAR BY ANONYMOUS AND JAFAR", false) guiSetAlpha(win1,0) guiSetVisible (win1, false) guiWindowSetSizable(win1, false) كذا function open() if guiGetAlpha(win1) == 1 then setTimer(guiSetAlpha,500,10,win1,guiGetAlpha(win1) - 0.1) setTimer(showCursor,5000,1,false) elseif ( guiGetAlpha(win1) == 0 ) then setTimer(guiSetAlpha,500,10,win1,guiGetAlpha(win1) + 0.1) setTimer(showCursor,5000,1,true) end end bindKey("F2","down",open) Link to comment
abu5lf Posted December 20, 2012 Share Posted December 20, 2012 اذا مهيب ظاهرة ماتقدر تخفيها تدريجيا Link to comment
./BlackBird# Posted December 20, 2012 Share Posted December 20, 2012 function MF(element,what) if(what==true)then setTimer(guiSetAlpha,500,10,element,guiGetAlpha(element) + 0.1) elseif(what==false) setTimer(guiSetAlpha,500,10,element,guiGetAlpha(element) - 0.1) end end) طريقه الاستخدام اظهار تدريجي MF(win1,true) اخفاء تدريجي MF(win1,false) --ما جربته-- Link to comment
AL-SAYED Posted December 20, 2012 Author Share Posted December 20, 2012 ماضبط النفذه ما تطلع Link to comment
==>ҭᾄlᾄl Posted December 21, 2012 Share Posted December 21, 2012 function gsa(element,type) a = guiGetAlpha(element) if type == open and a == 0 then timer = setTimer(function () guiSetAlpha(element,a + 0.1) if a == 1 then killTimer(timer)end end ,1000,0) elseif type == close and a == 1 then timerr = setTimer(function () guiSetAlpha(element,a - 0.1) if a == 0 then killTimer(timerr)end end ,1000,0) end end لفتح النافذه gsa(window,open) لقفل نافذه gsa(window,close) ما جربته Link to comment
AL-SAYED Posted December 21, 2012 Author Share Posted December 21, 2012 function gsa(element,type) a = guiGetAlpha(element) if type == open and a == 0 then timer = setTimer(function () guiSetAlpha(element,a + 0.1) if a == 1 then killTimer(timer)end end ,1000,0) elseif type == close and a == 1 then timerr = setTimer(function () guiSetAlpha(element,a - 0.1) if a == 0 then killTimer(timerr)end end ,1000,0) end end ----------------------------------------------------------- لفتح النافذه gsa(window,open) لقفل نافذه gsa(window,close) ما جربته اغير شي في الكود؟ Link to comment
abu5lf Posted December 21, 2012 Share Posted December 21, 2012 animation library by arc_: --[[ Client animation library by arc_ Version 1.0.0 Licence ---------------- You are free to modify this file and redistribute it with your changes. However, always mention that you changed it (and eventually what changes you made) and keep the original author, version number and licence intact. Selling this script or a derivative of it is not allowed. Documentation ---------------- Terminology - Animation: a sequence of phases that act on one or more elements and follow each other sequentially in time. Multiple animations can be running at the same time. All defined animations run in parallel. An animation is in fact one phase with several subphases (see below), with animation specific functions available. - Phase: a part of an animation sequence. A phase consists of a paramater that linearly goes from a given starting value to a given ending value, over the specified amount of time, and is applied to one certain element. While a phase is running, its callback function will be called onClientRender with the following arguments: phase.fn(element elem, float param, table phase) Specifying time and callback function is optional. If no time is specified but a function is, phase.fn(elem) will be called once. If no function is specified but a time is, the phase consists of simply waiting during that time, doing nothing. A phase can be run once, repeated multiple times or loop infinitely. Phases can also contain phases. In that case the parent phase consists of completing all child phases, in order. This allows you to f.e. make an element move left and right continuously: define a phase for moving it to the left, followed by a phase for moving it back to the right, and encapsulate these two phases in a parent phase that loops forever. Phases can be nested to arbitrary depth. The element a subphase works on is inherited from its parent phase (or, if the parent phase doesn't specify an element, from the grandparent, etc). Definition of a phase A phase is simply a table containing properties and (optionally) subphases. Available phase properties are: (the values for the properties are examples, not default values) phase = { from = 0, -- the starting value of the parameter to = 1, -- the ending value of the parameter [time = 1000,] -- the time (in ms) in which to go from start to end [fn = callback,] -- the function to call on each frame update [repeats = 5,] -- how many times to run this phase before going on to -- the next. defaults to 1 [subphase1,] -- optional subphases. if one or more of these are included, [subphase2,] -- only the "repeats" property is valid for this parent phase ... } Available functions anim = Animation.create(elem, phase1, phase2, ...) Creates and returns a new animation. This means nothing more than creating a new phase, putting the specified phases in it as subphases, and making the functions of the Animation class available to it. Once an animation is created, it is not yet running. anim = Animation.createAndPlay(elem, phase1, phase2, ...) Creates a new animation and immediately starts playing it. anim = Animation.createNamed(name, elem, ...) If an animation with the specified name exists, returns that animation. Otherwise creates a new named animation. You can look the animation up again later with Animation.getNamed(name). anim = Animation.createNamedAndPlay(name, elem, ...) Self explanatory. anim = Animation.getNamed(name) Returns the animation with the specified name if it exists, false otherwise. anim:play() Start playing a newly created animation or resume a paused animation. anim:pause() Pauses the animation. Resume it later with anim:play() or delete it with anim:remove(). anim:remove() Deletes the animation completely. It can not be resumed anymore. anim:isPlaying() Returns true if the animation is currently playing, false if not. Animation.playingAnimationsExist() Returns true if there is any animation that is currently playing. anim:addPhase(phase3), phase2:addPhase(phase3) Appends a new subphase to the animation or phase. Can be done while the animation is playing. Note that to be able to use phase2:addPhase(), phase2 first has to be processed (default values filled in, made part of the Phase class) by being passed as an argument to Animation.create[AndPlay] or addPhase. Examples Fade in a picture: local pict = guiCreateStaticImage(...) Animation.createAndPlay(pict, { from = 0, to = 1, time = 2000, fn = guiSetAlpha }) Fade in a picture using a preset (for more presets, see the end of this file): local pict = guiCreateStaticImage(...) Animation.createAndPlay(pict, Animation.presets.guiFadeIn(2000)) Move a label to the right while fading it in: local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) Animation.createAndPlay(label, Animation.presets.guiMove(200, 100, 2000)) Animation.createAndPlay(label, Animation.presets.guiFadeIn(2000)) Move a label left and right forever, without presets: function guiSetX(elem, x) local curX, curY = guiGetPosition(elem, false) guiSetPosition(elem, x, curY, false) end local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) Animation.createAndPlay( label, { repeats = 0, { from = 10, to = 200, time = 2000, fn = guiSetX }, { from = 200, to = 10, time = 2000, fn = guiSetX } } ) ]]-- Phase = {} Phase.__index = Phase Animation = setmetatable({}, { __index = Phase }) Animation.__index = Animation Animation.collection = {} function Animation.create(elem, ...) local anim = setmetatable({ elem = elem, ... }, Animation) anim:_setup() return anim end function Animation.createAndPlay(elem, ...) local anim = Animation.create(elem, ...) anim:play() return anim end function Animation.createNamed(name, elem, ...) local anim = Animation.getNamed(name) or Animation.create(elem, ...) anim.name = name return anim end function Animation.createNamedAndPlay(name, elem, ...) local anim = Animation.createNamed(name, elem, ...) anim:play() return anim end function Animation.getNamed(name) local i, anim = table.find(Animation.collection, 'name', name) return i and anim end function Animation:isPlaying() return self.playing or false end function Animation.playingAnimationsExist() return table.find(Animation.collection, 'playing', true) and true end function Animation:play() if self.playing then return end if not table.find(Animation.collection, self) then table.insert(Animation.collection, self) end if not Animation.playingAnimationsExist() then addEventHandler('onClientRender', getRootElement(), updateAnim) end self.playing = true end function Animation:pause() self.playing = false if not Animation.playingAnimationsExist() then removeEventHandler('onClientRender', getRootElement(), updateAnim) end end function Animation:remove() table.removevalue(Animation.collection, self) if not Animation.playingAnimationsExist() then removeEventHandler('onClientRender', getRootElement(), updateAnim) end self.playing = false end function Phase:_setup(parent) self.parent = parent if self[1] then for i,phase in ipairs(self) do if type(phase) == 'function' then phase = { fn = phase } self[i] = phase end setmetatable(phase, Phase) phase:_setup(self) end self.curphase = 1 elseif self.time then self.from = self.from or 0 self.to = self.to or 1 self.speed = (self.to - self.from) / self.time end self.repeats = self.repeats Link to comment
AL-SAYED Posted December 21, 2012 Author Share Posted December 21, 2012 animation library by arc_: --[[ Client animation library by arc_ Version 1.0.0 Licence ---------------- You are free to modify this file and redistribute it with your changes. However, always mention that you changed it (and eventually what changes you made) and keep the original author, version number and licence intact. Selling this script or a derivative of it is not allowed. Documentation ---------------- Terminology - Animation: a sequence of phases that act on one or more elements and follow each other sequentially in time. Multiple animations can be running at the same time. All defined animations run in parallel. An animation is in fact one phase with several subphases (see below), with animation specific functions available. - Phase: a part of an animation sequence. A phase consists of a paramater that linearly goes from a given starting value to a given ending value, over the specified amount of time, and is applied to one certain element. While a phase is running, its callback function will be called onClientRender with the following arguments: phase.fn(element elem, float param, table phase) Specifying time and callback function is optional. If no time is specified but a function is, phase.fn(elem) will be called once. If no function is specified but a time is, the phase consists of simply waiting during that time, doing nothing. A phase can be run once, repeated multiple times or loop infinitely. Phases can also contain phases. In that case the parent phase consists of completing all child phases, in order. This allows you to f.e. make an element move left and right continuously: define a phase for moving it to the left, followed by a phase for moving it back to the right, and encapsulate these two phases in a parent phase that loops forever. Phases can be nested to arbitrary depth. The element a subphase works on is inherited from its parent phase (or, if the parent phase doesn't specify an element, from the grandparent, etc). Definition of a phase A phase is simply a table containing properties and (optionally) subphases. Available phase properties are: (the values for the properties are examples, not default values) phase = { from = 0, -- the starting value of the parameter to = 1, -- the ending value of the parameter [time = 1000,] -- the time (in ms) in which to go from start to end [fn = callback,] -- the function to call on each frame update [repeats = 5,] -- how many times to run this phase before going on to -- the next. defaults to 1 [subphase1,] -- optional subphases. if one or more of these are included, [subphase2,] -- only the "repeats" property is valid for this parent phase ... } Available functions anim = Animation.create(elem, phase1, phase2, ...) Creates and returns a new animation. This means nothing more than creating a new phase, putting the specified phases in it as subphases, and making the functions of the Animation class available to it. Once an animation is created, it is not yet running. anim = Animation.createAndPlay(elem, phase1, phase2, ...) Creates a new animation and immediately starts playing it. anim = Animation.createNamed(name, elem, ...) If an animation with the specified name exists, returns that animation. Otherwise creates a new named animation. You can look the animation up again later with Animation.getNamed(name). anim = Animation.createNamedAndPlay(name, elem, ...) Self explanatory. anim = Animation.getNamed(name) Returns the animation with the specified name if it exists, false otherwise. anim:play() Start playing a newly created animation or resume a paused animation. anim:pause() Pauses the animation. Resume it later with anim:play() or delete it with anim:remove(). anim:remove() Deletes the animation completely. It can not be resumed anymore. anim:isPlaying() Returns true if the animation is currently playing, false if not. Animation.playingAnimationsExist() Returns true if there is any animation that is currently playing. anim:addPhase(phase3), phase2:addPhase(phase3) Appends a new subphase to the animation or phase. Can be done while the animation is playing. Note that to be able to use phase2:addPhase(), phase2 first has to be processed (default values filled in, made part of the Phase class) by being passed as an argument to Animation.create[AndPlay] or addPhase. Examples Fade in a picture: local pict = guiCreateStaticImage(...) Animation.createAndPlay(pict, { from = 0, to = 1, time = 2000, fn = guiSetAlpha }) Fade in a picture using a preset (for more presets, see the end of this file): local pict = guiCreateStaticImage(...) Animation.createAndPlay(pict, Animation.presets.guiFadeIn(2000)) Move a label to the right while fading it in: local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) Animation.createAndPlay(label, Animation.presets.guiMove(200, 100, 2000)) Animation.createAndPlay(label, Animation.presets.guiFadeIn(2000)) Move a label left and right forever, without presets: function guiSetX(elem, x) local curX, curY = guiGetPosition(elem, false) guiSetPosition(elem, x, curY, false) end local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) Animation.createAndPlay( label, { repeats = 0, { from = 10, to = 200, time = 2000, fn = guiSetX }, { from = 200, to = 10, time = 2000, fn = guiSetX } } ) ]]-- Phase = {} Phase.__index = Phase Animation = setmetatable({}, { __index = Phase }) Animation.__index = Animation Animation.collection = {} function Animation.create(elem, ...) local anim = setmetatable({ elem = elem, ... }, Animation) anim:_setup() return anim end function Animation.createAndPlay(elem, ...) local anim = Animation.create(elem, ...) anim:play() return anim end function Animation.createNamed(name, elem, ...) local anim = Animation.getNamed(name) or Animation.create(elem, ...) anim.name = name return anim end function Animation.createNamedAndPlay(name, elem, ...) local anim = Animation.createNamed(name, elem, ...) anim:play() return anim end function Animation.getNamed(name) local i, anim = table.find(Animation.collection, 'name', name) return i and anim end function Animation:isPlaying() return self.playing or false end function Animation.playingAnimationsExist() return table.find(Animation.collection, 'playing', true) and true end function Animation:play() if self.playing then return end if not table.find(Animation.collection, self) then table.insert(Animation.collection, self) end if not Animation.playingAnimationsExist() then addEventHandler('onClientRender', getRootElement(), updateAnim) end self.playing = true end function Animation:pause() self.playing = false if not Animation.playingAnimationsExist() then removeEventHandler('onClientRender', getRootElement(), updateAnim) end end function Animation:remove() table.removevalue(Animation.collection, self) if not Animation.playingAnimationsExist() then removeEventHandler('onClientRender', getRootElement(), updateAnim) end self.playing = false end function Phase:_setup(parent) self.parent = parent if self[1] then for i,phase in ipairs(self) do if type(phase) == 'function' then phase = { fn = phase } self[i] = phase end setmetatable(phase, Phase) phase:_setup(self) end self.curphase = 1 elseif self.time then self.from = self.from or 0 self.to = self.to or 1 self.speed = Link to comment
abu5lf Posted December 21, 2012 Share Posted December 21, 2012 جرب win1 = guiCreateWindow(242, 106, 695, 563, "FREE CAR BY ANONYMOUS AND JAFAR", false) guiWindowSetSizable(win1, false) guiSetAlpha(win1, 0) showCursor ( false ) i1 = guiCreateStaticImage(52, 35, 157, 101, "1.png", false, win1) i2 = guiCreateStaticImage(252, 35, 177, 101, "2.png", false, win1) b1 = guiCreateButton(52, 146, 160, 18, "وحش البايسن", false, win1) b2 = guiCreateButton(262, 146, 160, 18, "سيارة الرموز", false, win1) i3 = guiCreateStaticImage(482, 35, 173, 101, "3.png", false, win1) b3 = guiCreateButton(485, 146, 160, 18, "موتر سيكل", false, win1) i4 = guiCreateStaticImage(52, 241, 172, 114, "6.png", false, win1) i5 = guiCreateStaticImage(252, 241, 187, 115, "7.png", false, win1) b4 = guiCreateButton(52, 366, 160, 18, "دتسن", false, win1) b5 = guiCreateButton(252, 366, 160, 18, "همر", false, win1) i6 = guiCreateStaticImage(52, 394, 161, 124, "10.png", false, win1) b6 = guiCreateButton(52, 528, 160, 18, "زد/28", false, win1) i7 = guiCreateStaticImage(482, 241, 187, 115, "11.png", false, win1) b7 = guiCreateButton(482, 366, 160, 18, "جيب", false, win1) i8 = guiCreateStaticImage(252, 241, 187, 115, "12.png", false, win1) b8 = guiCreateButton(252, 366, 160, 18, "مصفحه", false, win1) i9 = guiCreateStaticImage(252, 394, 161, 124, "13.png", false, win1) b9 = guiCreateButton(252, 528, 160, 18, "كامري", false, win1) i10 = guiCreateStaticImage(485, 394, 161, 124, "14.png", false, win1) b10 = guiCreateButton(485, 528, 160, 18, "هوندا", false, win1) + bindKey( 'F7', 'down', function( ) if not( i ) then Animation.createAndPlay( win1, Animation.presets.guiFadeIn( 2000 ) ) showCursor( true ) else Animation.createAndPlay( win1, Animation.presets.guiFadeOut( 2000 ) ) showCursor( false ) end i = not i end ) Link to comment
AL-SAYED Posted December 21, 2012 Author Share Posted December 21, 2012 ماصار تطلع بس الصور بدون اللوحه Link to comment
abu5lf Posted December 21, 2012 Share Posted December 21, 2012 ركبت المكتبة في المود ؟ الكود جربته وشغال معي فلآ تكتب رد تقول مهب شغال لين تتأكد من نفسك ) Link to comment
AL-SAYED Posted December 25, 2012 Author Share Posted December 25, 2012 bindKey( 'F7', 'down', function( ) if not( i ) then Animation.createAndPlay(ha7soon, Animation.presets.guiMove(242, 106, 2000)) Animation.createAndPlay(ha7soon, Animation.presets.guiFadeIn(2000)) showCursor( true ) else Animation.createAndPlay( ha7soon, Animation.presets.guiFadeOut(2000)) showCursor (false ) end i = not i end ) --[[ Client animation library by arc_ Version 1.0.0 Licence ---------------- You are free to modify this file and redistribute it with your changes. However, always mention that you changed it (and eventually what changes you made) and keep the original author, version number and licence intact. Selling this script or a derivative of it is not allowed. Documentation ---------------- Terminology - Animation: a sequence of phases that act on one or more elements and follow each other sequentially in time. Multiple animations can be running at the same time. All defined animations run in parallel. An animation is in fact one phase with several subphases (see below), with animation specific functions available. - Phase: a part of an animation sequence. A phase consists of a paramater that linearly goes from a given starting value to a given ending value, over the specified amount of time, and is applied to one certain element. While a phase is running, its callback function will be called onClientRender with the following arguments: phase.fn(element elem, float param, table phase) Specifying time and callback function is optional. If no time is specified but a function is, phase.fn(elem) will be called once. If no function is specified but a time is, the phase consists of simply waiting during that time, doing nothing. A phase can be run once, repeated multiple times or loop infinitely. Phases can also contain phases. In that case the parent phase consists of completing all child phases, in order. This allows you to f.e. make an element move left and right continuously: define a phase for moving it to the left, followed by a phase for moving it back to the right, and encapsulate these two phases in a parent phase that loops forever. Phases can be nested to arbitrary depth. The element a subphase works on is inherited from its parent phase (or, if the parent phase doesn't specify an element, from the grandparent, etc). Definition of a phase A phase is simply a table containing properties and (optionally) subphases. Available phase properties are: (the values for the properties are examples, not default values) phase = { from = 0, -- the starting value of the parameter to = 1, -- the ending value of the parameter [time = 1000,] -- the time (in ms) in which to go from start to end [fn = callback,] -- the function to call on each frame update [repeats = 5,] -- how many times to run this phase before going on to -- the next. defaults to 1 [subphase1,] -- optional subphases. if one or more of these are included, [subphase2,] -- only the "repeats" property is valid for this parent phase ... } Available functions anim = Animation.create(elem, phase1, phase2, ...) Creates and returns a new animation. This means nothing more than creating a new phase, putting the specified phases in it as subphases, and making the functions of the Animation class available to it. Once an animation is created, it is not yet running. anim = Animation.createAndPlay(elem, phase1, phase2, ...) Creates a new animation and immediately starts playing it. anim = Animation.createNamed(name, elem, ...) If an animation with the specified name exists, returns that animation. Otherwise creates a new named animation. You can look the animation up again later with Animation.getNamed(name). anim = Animation.createNamedAndPlay(name, elem, ...) Self explanatory. anim = Animation.getNamed(name) Returns the animation with the specified name if it exists, false otherwise. anim:play() Start playing a newly created animation or resume a paused animation. anim:pause() Pauses the animation. Resume it later with anim:play() or delete it with anim:remove(). anim:remove() Deletes the animation completely. It can not be resumed anymore. anim:isPlaying() Returns true if the animation is currently playing, false if not. Animation.playingAnimationsExist() Returns true if there is any animation that is currently playing. anim:addPhase(phase3), phase2:addPhase(phase3) Appends a new subphase to the animation or phase. Can be done while the animation is playing. Note that to be able to use phase2:addPhase(), phase2 first has to be processed (default values filled in, made part of the Phase class) by being passed as an argument to Animation.create[AndPlay] or addPhase. Examples Fade in a picture: local pict = guiCreateStaticImage(...) Animation.createAndPlay(pict, { from = 0, to = 1, time = 2000, fn = guiSetAlpha }) Fade in a picture using a preset (for more presets, see the end of this file): local pict = guiCreateStaticImage(...) Animation.createAndPlay(pict, Animation.presets.guiFadeIn(2000)) Move a label to the right while fading it in: local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) Animation.createAndPlay(label, Animation.presets.guiMove(200, 100, 2000)) Animation.createAndPlay(label, Animation.presets.guiFadeIn(2000)) Move a label left and right forever, without presets: function guiSetX(elem, x) local curX, curY = guiGetPosition(elem, false) guiSetPosition(elem, x, curY, false) end local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) Animation.createAndPlay( label, { repeats = 0, { from = 10, to = 200, time = 2000, fn = guiSetX }, { from = 200, to = 10, time = 2000, fn = guiSetX } } ) ]]-- Phase = {} Phase.__index = Phase Animation = setmetatable({}, { __index = Phase }) Animation.__index = Animation Animation.collection = {} function Animation.create(elem, ...) local anim = setmetatable({ elem = elem, ... }, Animation) anim:_setup() return anim end function Animation.createAndPlay(elem, ...) local anim = Animation.create(elem, ...) anim:play() return anim end function Animation.createNamed(name, elem, ...) local anim = Animation.getNamed(name) or Animation.create(elem, ...) anim.name = name return anim end function Animation.createNamedAndPlay(name, elem, ...) local anim = Animation.createNamed(name, elem, ...) anim:play() return anim end function Animation.getNamed(name) local i, anim = table.find(Animation.collection, 'name', name) return i and anim end function Animation:isPlaying() return self.playing or false end function Animation.playingAnimationsExist() return table.find(Animation.collection, 'playing', true) and true end function Animation:play() if self.playing then return end if not table.find(Animation.collection, self) then table.insert(Animation.collection, self) end if not Animation.playingAnimationsExist() then addEventHandler('onClientRender', getRootElement(), updateAnim) end self.playing = true end function Animation:pause() self.playing = false if not Animation.playingAnimationsExist() then removeEventHandler('onClientRender', getRootElement(), updateAnim) end end function Animation:remove() table.removevalue(Animation.collection, self) if not Animation.playingAnimationsExist() then removeEventHandler('onClientRender', getRootElement(), updateAnim) end self.playing = false end function Phase:_setup(parent) self.parent = parent if self[1] then for i,phase in ipairs(self) do if type(phase) == 'function' then phase = { fn = phase } self[i] = phase end setmetatable(phase, Phase) phase:_setup(self) end self.curphase = 1 elseif self.time then self.from = self.from or 0 self.to = self.to or 1 self.speed = (self.to - self.from) / self.time end self.repeats = self.repeats Link to comment
abu5lf Posted January 1, 2013 Share Posted January 1, 2013 bindKey( 'F7', 'down', function( ) if not( i ) then Animation.createAndPlay( ha7soon, Animation.presets.guiMove( 0, 0, 2000 ) ) Animation.createAndPlay( ha7soon, Animation.presets.guiFadeIn( 2000 ) ) showCursor( true ) else Animation.createAndPlay( ha7soon, Animation.presets.guiMove( 242, 106, 2000 ) ) Animation.createAndPlay( ha7soon, Animation.presets.guiFadeOut( 2000 ) ) showCursor( false ) end i = not i end ) لاتنسى تحط الكود هذا تحت النافذة : guiSetAlpha( ha7soon, 0 ) Link to comment
AL-SAYED Posted January 2, 2013 Author Share Posted January 2, 2013 شنو استخدم اذا خليت الزر يطلع+يختفي وبعدين تختفي النافذه Link to comment
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