☠ RaZeR ☠ Posted June 7, 2014 Share Posted June 7, 2014 عندي مود شريط القوانين الي تحت ابيه يكون في نصف السيرفر r,g,b = 75,206,250 rr,gg,bb = 0,0,0 num = 1 px = 0 -------------------- function getColor() return r,g,b end function getBackColor() return rr,gg,bb end function setColor(tr,tg,tb) r,g,b = tr,tg,tb end function setBackColor(r,g,b) rr,gg,bb = r,g,b end addEventHandler("onClientRender",root, function () local x,y = guiGetScreenSize() dxDrawRectangle(0,y - 20,x,y,tocolor(rr,gg,bb,120)) dxDrawText(msg[num],px,y - 20,x,y,tocolor(r,g,b,255),1.5,"default-bold","center","center",false,false,false,true) end ) function makeTurn() local x,y = guiGetScreenSize() local x = x + 50 if px >= x then px = -x setMsg() else px = px + 6 end end function setMsg() if num == #msg then num = 1 else num = num + 1 end end ---- start = setTimer(makeTurn,50,00) ارجو الحل وشكرا Link to comment
☠ RaZeR ☠ Posted June 7, 2014 Author Share Posted June 7, 2014 px عدل المتغير حق في كثير px تقصد px = 0 Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 انت وش تقصد بنص السيرفر ؟ يعني تبي تغير موقع الكلام والشريط الاسود؟ Link to comment
☠ RaZeR ☠ Posted June 7, 2014 Author Share Posted June 7, 2014 انت وش تقصد بنص السيرفر ؟ يعني تبي تغير موقع الكلام والشريط الاسود؟ يب يعني يتحرك في نصف الشاشة مب تحت Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 عندي لك طريقه عشان يكون الشريط لكل الشاشات بحيث ما يختلف في الشاشات الكبيره او الصغيره, r,g,b = 75,206,250 rr,gg,bb = 0,0,0 num = 1 px = 0 local width, height = 1366, 768 -------------------- function getColor() return r,g,b end function getBackColor() return rr,gg,bb end function setColor(tr,tg,tb) r,g,b = tr,tg,tb end function setBackColor(r,g,b) rr,gg,bb = r,g,b end addEventHandler("onClientRender",root, function () local x,y = guiGetScreenSize() dxDrawRectangle(0,y * ( 400 / height ),x * ( 1365 / width ), y * ( 40 / height ) ,tocolor(rr,gg,bb,120)) dxDrawText(msg[num],x * ( px / width ),y * ( 800 / height ),x * ( 1365 / width ), y * ( 40 / height ),tocolor(r,g,b,255),1.5,"default-bold","center","center",false,false,false,true) end ) function makeTurn() local x,y = guiGetScreenSize() local x = x + 50 if px >= x then px = -x setMsg() else px = px + 6 end end function setMsg() if num == #msg then num = 1 else num = num + 1 end end ---- start = setTimer(makeTurn,50,0) عندك في السطر 5 , تحط الطول والعرض حق الشاشه حقك, كمثال الشاشه حقي local width, height = 1366, 768 Link to comment
☠ RaZeR ☠ Posted June 7, 2014 Author Share Posted June 7, 2014 كفوووو اشتغل بس ممكن طلب ثاني ابيه يختفي اذا كتب في اف 8 الشريط وابيه يظهر ثاني اذا كتب في اف 8 الشريط Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 r,g,b = 75,206,250 rr,gg,bb = 0,0,0 num = 1 px = 0 local width, height = 1366, 768 -------------------- function getColor() return r,g,b end function getBackColor() return rr,gg,bb end function setColor(tr,tg,tb) r,g,b = tr,tg,tb end function setBackColor(r,g,b) rr,gg,bb = r,g,b end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end original = function () local x,y = guiGetScreenSize() dxDrawRectangle(0,y * ( 400 / height ),x * ( 1365 / width ), y * ( 40 / height ) ,tocolor(rr,gg,bb,120)) dxDrawText(msg[num],x * ( px / width ),y * ( 800 / height ),x * ( 1365 / width ), y * ( 40 / height ),tocolor(r,g,b,255),1.5,"default-bold","center","center",false,false,false,true) end addEventHandler("onClientRender", root, original ) addCommandHandler ('الشريط',function () if isEventHandlerAdded ( 'onClientRender', root, original ) then removeEventHandler("onClientRender", root, original ) if isTimer ( start ) then killTimer ( start ) start = nil end else addEventHandler("onClientRender", root, original ) start = setTimer(makeTurn,50,0) end end ) function makeTurn() local x,y = guiGetScreenSize() local x = x + 50 if px >= x then px = -x setMsg() else px = px + 6 end end function setMsg() if num == #msg then num = 1 else num = num + 1 end end ---- start = setTimer(makeTurn,50,0) Link to comment
☠ RaZeR ☠ Posted June 7, 2014 Author Share Posted June 7, 2014 الطلب الثالث لوسمحت اخر طلب الكود ذا جربته ماشتغل وحطيته في ServerSide ومااشتغل function Chat ( ) outputChatBox ( "~•][هل انت مسلم # ][•~ ", true, 63, 252, 41 ) outputChatBox ( "~•][ إذا كنت مسلما اكتاف 8 نعم ][•~", true, 63, 252, 41 ) end setTimer ( Chat, 500000, 0 ) ----------------------------------------------------- addCommandHandler("نعم", function Rmdan ( player ) givePlayerMoney ( player , 500 ) outputChatBox ( "~•][تم اعطائك المؤنة الاسلامية][•~ ", true, 63, 252, 41 ) end Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 player بـ true شيل اسم الوظيفه, وبدل Link to comment
K1NG Posted June 7, 2014 Share Posted June 7, 2014 player بـ true شيل اسم الوظيفه, وبدل فيه عنده قوس ناقص . (nil) في التايمر لأنه غير معرف player بـ true ماينفع يبدل + --- الطلب الثالث لوسمحت اخر طلبالكود ذا جربته ماشتغل وحطيته في ServerSide ومااشتغل function Chat ( ) outputChatBox ( "~•][هل انت مسلم # ][•~ ", true, 63, 252, 41 ) outputChatBox ( "~•][ إذا كنت مسلما اكتاف 8 نعم ][•~", true, 63, 252, 41 ) end setTimer ( Chat, 500000, 0 ) ----------------------------------------------------- addCommandHandler("نعم", function Rmdan ( player ) givePlayerMoney ( player , 500 ) outputChatBox ( "~•][تم اعطائك المؤنة الاسلامية][•~ ", true, 63, 252, 41 ) end setTimer ( function ( ) outputChatBox ( "~•][هل انت مسلم # ][•~ ", root, 63, 252, 41, true ) outputChatBox ( "~•][ إذا كنت مسلما اكتاف 8 نعم ][•~", root, 63, 252, 41, true ) end, 500000, 0 ) ----------------------------------------------------- addCommandHandler ( "نعم", function ( player ) givePlayerMoney ( player, 500 ) outputChatBox ( "~•][تم اعطائك المؤنة الاسلامية][•~ ", player, 63, 252, 41, true ) end ) Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 اقصد ترو الي في الكوماند ذذ ما انتبهت على الي فوق , بالنسبه للقوس شفته حسبت اني كتبته ,, المهم مشكور ع التنبيه . مواصل معد اشوف Link to comment
☠ RaZeR ☠ Posted June 7, 2014 Author Share Posted June 7, 2014 شباب الكود مايعطي فلوس وما يظهر الالونا و ماابيه ياخذ اللاعب كل مره فلوس Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 الكود سيرفر ^ اجل وش نظامك كم مره تبيه ياخذ ومتى ؟ Link to comment
ALw7sH Posted June 7, 2014 Share Posted June 7, 2014 setTimer ( function ( ) outputChatBox ( "~•][هل انت مسلم # ][•~ ", root, 63, 252, 41, true ) outputChatBox ( "~•][ إذا كنت مسلما اكتاف 8 نعم ][•~", root, 63, 252, 41, true ) end, 500000, 0 ) ----------------------------------------------------- addCommandHandler ( "نعم", function ( player ) if getElementData(player, 'getM') then outputChatBox ( "~•][لايمكنك أخذ المال مرتين][•~ ", player, 63, 252, 41, true ) else setElementData(player, 'getM',true) givePlayerMoney ( player, 500 ) outputChatBox ( "~•][تم اعطائك المؤنة الاسلامية][•~ ", player, 63, 252, 41, true ) end end ) Link to comment
Max+ Posted June 7, 2014 Share Posted June 7, 2014 setTimer ( function ( ) outputChatBox ( "~•][هل انت مسلم # ][•~ ", root, 63, 252, 41, true ) outputChatBox ( "~•][ إذا كنت مسلما اكتاف 8 نعم ][•~", root, 63, 252, 41, true ) end, 500000, 0 ) ----------------------------------------------------- addCommandHandler ( "نعم", function ( player ) if getElementData(player, 'getM') then outputChatBox ( "~•][لايمكنك أخذ المال مرتين][•~ ", player, 63, 252, 41, true ) else setElementData(player, 'getM',true) givePlayerMoney ( player, 500 ) outputChatBox ( "~•][تم اعطائك المؤنة الاسلامية][•~ ", player, 63, 252, 41, true ) end end ) فيه طريقة اخرى , if (getPlayerMoney(localPlayer) >= 500) then outputChatBox ( "~•][لايمكنك أخذ المال مرتين][•~ ", player, 63, 252, 41, true ) else givePlayerMoney ( player, 500 ) outputChatBox ( "~•][تم زيادة المؤنة الاسلامية][•~ ", player, 63, 252, 41, true ) end Link to comment
ALw7sH Posted June 7, 2014 Share Posted June 7, 2014 setTimer ( function ( ) outputChatBox ( "~•][هل انت مسلم # ][•~ ", root, 63, 252, 41, true ) outputChatBox ( "~•][ إذا كنت مسلما اكتاف 8 نعم ][•~", root, 63, 252, 41, true ) end, 500000, 0 ) ----------------------------------------------------- addCommandHandler ( "نعم", function ( player ) if getElementData(player, 'getM') then outputChatBox ( "~•][لايمكنك أخذ المال مرتين][•~ ", player, 63, 252, 41, true ) else setElementData(player, 'getM',true) givePlayerMoney ( player, 500 ) outputChatBox ( "~•][تم اعطائك المؤنة الاسلامية][•~ ", player, 63, 252, 41, true ) end end ) فيه طريقة اخرى , if (getPlayerMoney(localPlayer) >= 500) then outputChatBox ( "~•][لايمكنك أخذ المال مرتين][•~ ", player, 63, 252, 41, true ) else givePlayerMoney ( player, 500 ) outputChatBox ( "~•][تم زيادة المؤنة الاسلامية][•~ ", player, 63, 252, 41, true ) end اقرا كلام صاحب الموضوع عدل الي انت سويته حتى لو ما اخذ من قبل وفلوسه اكثر من 500 مابيقدر ياخذ وثاني شي ليه خبصت ام الكود كذا لول Link to comment
Max+ Posted June 7, 2014 Share Posted June 7, 2014 حبيبي , ادري ماراح ياخذ , اذا فلوسه اكثر ,انا مسوي التحقق عشان كذا يعني اذا فلوسه 500 ماياخذ معونه , اما فلوسه اقل ,من 500 ياخذ , وبالنسبة للخبص , تقصد localPlayer ? ادري , ماودي اكمل له السكربت , ودي يتعلم , انا كنت زيه حقيقة , مره ماعرف , شي الحين اصحح بعض السكربتات , وانا ماتوقعت اعرف اصحهها , Link to comment
ALw7sH Posted June 7, 2014 Share Posted June 7, 2014 حبيبي , ادري ماراح ياخذ , اذا فلوسه اكثر ,انا مسوي التحقق عشان كذا يعني اذا فلوسه 500 ماياخذ معونه , اما فلوسه اقل ,من 500 ياخذ , وبالنسبة للخبص , تقصد localPlayer ? ادري , ماودي اكمل له السكربت , ودي يتعلم , انا كنت زيه حقيقة , مره ماعرف , شي الحين اصحح بعض السكربتات , وانا ماتوقعت اعرف اصحهها , شباب الكود مايعطي فلوس وما يظهر الالونا و ماابيه ياخذ اللاعب كل مره فلوس ماقال اذا فلوسه اكثر من 500 ماياخذ قال ياخذ مره وخلاص '~' Link to comment
#DRAGON!FIRE Posted June 7, 2014 Share Posted June 7, 2014 local table = { } addCommandHandler( "نعم", function( player ) if ( table[player] ) then return outputChatBox ( "~•][لايمكنك أخذ المال مرتين][•~ ", player, 63, 252, 41, true ) end table.insert( table, player ) givePlayerMoney ( player, 500 ) end ) Link to comment
K1NG Posted June 8, 2014 Share Posted June 8, 2014 * Server Side: takeMoney = { } setTimer ( function ( ) outputChatBox ( "~•][هل انت مسلم # ][•~", root, 63, 252, 41, true ) outputChatBox ( "~•][ إذا كنت مسلما اكتاف 8 نعم ][•~", root, 63, 252, 41, true ) end, 500000, 0 ) ----------------------------------------------------- addCommandHandler ( "نعم", function ( player ) if not ( takeMoney [ player ] ) then givePlayerMoney ( player, 500 ) takeMoney [ player ] = true outputChatBox ( "~•][تم اعطائك المؤنة الاسلامية][•~", player, 63, 252, 41, true ) else outputChatBox ( "~•][عذراً، لقد تم اعطائك المؤنة الاسلامية من قبل][•~", player, 63, 252, 41, true ) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if ( takeMoney [ source ] ) then takeMoney [ source ] = nil end end ) Link to comment
☠ RaZeR ☠ Posted June 10, 2014 Author Share Posted June 10, 2014 # شكرا شباب الكود اشتغل @# يغلق 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