Mr.Ronaldo Posted May 23, 2015 Share Posted May 23, 2015 لو سمحت شباب اسف علي الطلبات الكتيره عندي مشكله في مود اللفلات انا حاطت بيه SetProgress ولكن المشكله انه يجيب لاق لما احطو ولو مسحتو يشتغل عادي ذا هو الكود guiProgressBarSetProgress(ronaldo, tonumber(percent) or 0) Link to comment
Mr.Ronaldo Posted May 23, 2015 Author Share Posted May 23, 2015 اطرح الكود كامل local sx, sy = guiGetScreenSize() function drawExperience() ronaldo = guiCreateProgressBar(42, 742, 279, 16, false) local experience = getElementData(localPlayer,"experience") or 0 local experience_r = getElementData(localPlayer,"experience_r") or 0 local level = getElementData(localPlayer,"level") or 1 local percent = (experience / experience_r * 100) if (percent >= 100) then percent = 0 elseif (experience_r < 1) then percent = 0 end dxDrawText("Level: ".. tostring(level) .." [ Exp Points ] : ".. tostring(experience) .." / ".. tostring(experience_r), 57, 743, 320, 756, tocolor(255, 44, 0, 200), 1.00, "default-bold", "left", "top", false, true, true, true, false) guiProgressBarSetProgress(ronaldo, tonumber(percent) or 0) end addEventHandler("onClientRender",root,drawExperience) Link to comment
ALw7sH Posted May 23, 2015 Share Posted May 23, 2015 الخطأ انك حاط فنكشن guiCreateProgressBar داخل ايفنت الاون كلاينت ريندر يعني بكل فريم راح يصنع بروجس بار جديد لازم تخليه خارج الايفنت ذا Link to comment
Mr.Ronaldo Posted May 23, 2015 Author Share Posted May 23, 2015 الخطأ انك حاط فنكشنguiCreateProgressBar داخل ايفنت الاون كلاينت ريندر يعني بكل فريم راح يصنع بروجس بار جديد لازم تخليه خارج الايفنت ذا مشكور بجرب ناو Link to comment
Mr.Ronaldo Posted May 24, 2015 Author Share Posted May 24, 2015 الخطأ انك حاط فنكشنguiCreateProgressBar داخل ايفنت الاون كلاينت ريندر يعني بكل فريم راح يصنع بروجس بار جديد لازم تخليه خارج الايفنت ذا مشكور بجرب ناو جربت الحل وما نفع للاسف ذا ملف الكلينت كامل والى تحصل منه المشكله ياريت اي واحد يشوفلي حل ضروري local sx, sy = guiGetScreenSize() function drawExperience() ronaldo = guiCreateProgressBar(42, 742, 279, 16, false) local experience = getElementData(localPlayer,"experience") or 0 local experience_r = getElementData(localPlayer,"experience_r") or 0 local level = getElementData(localPlayer,"level") or 1 local percent = (experience / experience_r * 100) if (percent >= 100) then percent = 0 elseif (experience_r < 1) then percent = 0 end dxDrawText("Level: ".. tostring(level) .." [ Exp Points ] : ".. tostring(experience) .." / ".. tostring(experience_r), 57, 743, 320, 756, tocolor(255, 44, 0, 200), 1.00, "default-bold", "left", "top", false, true, true, true, false) guiProgressBarSetProgress(ronaldo, tonumber(percent) or 0) end addEventHandler("onClientRender",root,drawExperience) addEvent ( "LevelUpEffect", true ) addEventHandler ( "LevelUpEffect", root, function ( ) PlayerLevelUpSound() addEventHandler("onClientRender",root,DrawLevelUp) setTimer(function() removeEventHandler("onClientRender",root,DrawLevelUp) end, 4000, 1) end ) function PlayerLevelUpSound() local sound = playSound("levelup.mp3") setSoundVolume(sound, 1) end -- ربنا موجود -- function DrawLevelUp() dxDrawBorderedText( "LEVEL UP!!!", sx/2, sy/15, sx/2, sx/2, tocolor(255,144,0,255),(sx/1024)*2.5,"pricedown","center","center",false,false,false ) end Link to comment
shwaeki Posted May 24, 2015 Share Posted May 24, 2015 جرب local sx, sy = guiGetScreenSize() ronaldo = guiCreateProgressBar(42, 742, 279, 16, false) function drawExperience() local experience = getElementData(localPlayer,"experience") or 0 local experience_r = getElementData(localPlayer,"experience_r") or 0 local level = getElementData(localPlayer,"level") or 1 local percent = (experience / experience_r * 100) if (percent >= 100) then percent = 0 elseif (experience_r < 1) then percent = 0 end dxDrawText("Level: ".. tostring(level) .." [ Exp Points ] : ".. tostring(experience) .." / ".. tostring(experience_r), 57, 743, 320, 756, tocolor(255, 44, 0, 200), 1.00, "default-bold", "left", "top", false, true, true, true, false) guiProgressBarSetProgress(ronaldo, tonumber(percent) or 0) end addEventHandler("onClientRender",root,drawExperience) addEvent ( "LevelUpEffect", true ) addEventHandler ( "LevelUpEffect", root, function ( ) PlayerLevelUpSound() addEventHandler("onClientRender",root,DrawLevelUp) setTimer(function() removeEventHandler("onClientRender",root,DrawLevelUp) end, 4000, 1) end ) function PlayerLevelUpSound() local sound = playSound("levelup.mp3") setSoundVolume(sound, 1) end -- ربنا موجود -- function DrawLevelUp() dxDrawBorderedText( "LEVEL UP!!!", sx/2, sy/15, sx/2, sx/2, tocolor(255,144,0,255),(sx/1024)*2.5,"pricedown","center","center",false,false,false ) end 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