Doffy Posted January 23, 2017 Posted January 23, 2017 (edited) شباب انا ابي مساعدة ابي اول م يضغط علي بوتون يخلي الكلام الي تحت ذا مثلا 1 واول ما يضغط علي الزر ثاني يخله 2 لين 10 اخر شي يعطيه دم وينقص من ال 10 H واول ما يضغط علي حرف واول ما يخلصو ال 10 ما يقدر ياخذ لين يشتري ثاني اكواد كلنت سايد addEventHandler ( 'onClientGUIClick',root, function () if ( source == GUIEditor.button[2] ) then triggerServerEvent ( "getMoney", localPlayer ) guiAntiFlood(GUIEditor.button[2],900) end end ) addEvent("1",true) addEventHandler("1",root, function() guiSetText(GUIEditor.label[5],"1") end) سيرفر سايد addEvent("getMoney",true) addEventHandler("getMoney",root, function() if getPlayerMoney(source) > 10000 then takePlayerMoney(source,10000) triggerClientEvent("1",source) end end) Edited January 23, 2017 by KinG_Himoo12
Doffy Posted January 23, 2017 Author Posted January 23, 2017 2 minutes ago, Deativated said: م فهمت عليك وضح ؟ اشرحلك يعني المود كامل ؟
Abu-Solo Posted January 23, 2017 Posted January 23, 2017 8 minutes ago, KinG_Himoo12 said: اشرحلك يعني المود كامل ؟ setElementData getElementData 1
Doffy Posted January 23, 2017 Author Posted January 23, 2017 Just now, Abu-Solo said: setElementData getElementData طيب واول ما يشتري كيف بخله يزيد ؟ انا معرف غير اخليه مره وحدا كيف اسويه ثاني ؟
Abu-Solo Posted January 23, 2017 Posted January 23, 2017 Just now, KinG_Himoo12 said: طيب واول ما يشتري كيف بخله يزيد ؟ انا معرف غير اخليه مره وحدا كيف اسويه ثاني ؟ استخدم التايمر...
Doffy Posted January 23, 2017 Author Posted January 23, 2017 1 minute ago, Abu-Solo said: استخدم التايمر... اشرحلي طيب يخوي
Abu-Solo Posted January 23, 2017 Posted January 23, 2017 (edited) 54 minutes ago, KinG_Himoo12 said: اشرحلي طيب يخوي ---- الكود اللي يجيبلك عد من 1 - 10 ----- lab2 = غيره لـ اسم الليبل حقك ----- btn = غيره لـ اسم الزرار حقك addEventHandler("onClientGUIClick",root,function() if source == btn then if getElementData(localPlayer,"points") == 1 then setElementData(localPlayer,"points",2) guiSetText(lab2,"1") return end if getElementData(localPlayer,"points") == 2 then guiSetText(lab2,"2") setElementData(localPlayer,"points",3) return end if getElementData(localPlayer,"points") == 3 then guiSetText(lab2,"3") setElementData(localPlayer,"points",4) return end if getElementData(localPlayer,"points") == 4 then guiSetText(lab2,"4") setElementData(localPlayer,"points",5) return end if getElementData(localPlayer,"points") == 5 then setElementData(localPlayer,"points",6) guiSetText(lab2,"5") return end if getElementData(localPlayer,"points") == 6 then guiSetText(lab2,"6") setElementData(localPlayer,"points",7) return end if getElementData(localPlayer,"points") == 7 then guiSetText(lab2,"7") setElementData(localPlayer,"points",8) return end if getElementData(localPlayer,"points") == 8 then guiSetText(lab2,"8") setElementData(localPlayer,"points",9) return end if getElementData(localPlayer,"points") == 9 then guiSetText(lab2,"9") setElementData(localPlayer,"points",10) return end if getElementData(localPlayer,"points") == 10 then guiSetText(lab2,"10") guiSetEnabled(btn,false) setTimer(guiSetEnabled,5000,1,btn,true) setTimer(guiSetText,100,1,lab2,"",true) end end setElementData(localPlayer,"points",1) end ) اذا ما عجبتك الطريقة, انتظر لين يساعدونك الابطال Edited January 23, 2017 by Abu-Solo
Doffy Posted January 23, 2017 Author Posted January 23, 2017 4 hours ago, Abu-Solo said: استخدم التايمر... اشرحلي طيب يخوي 4 hours ago, Abu-Solo said: ---- الكود اللي يجيبلك عد من 1 - 10 ----- lab2 = غيره لـ اسم الليبل حقك ----- btn = غيره لـ اسم الزرار حقك addEventHandler("onClientGUIClick",root,function() if source == btn then if getElementData(localPlayer,"points") == 1 then setElementData(localPlayer,"points",2) guiSetText(lab2,"1") return end if getElementData(localPlayer,"points") == 2 then guiSetText(lab2,"2") setElementData(localPlayer,"points",3) return end if getElementData(localPlayer,"points") == 3 then guiSetText(lab2,"3") setElementData(localPlayer,"points",4) return end if getElementData(localPlayer,"points") == 4 then guiSetText(lab2,"4") setElementData(localPlayer,"points",5) return end if getElementData(localPlayer,"points") == 5 then setElementData(localPlayer,"points",6) guiSetText(lab2,"5") return end if getElementData(localPlayer,"points") == 6 then guiSetText(lab2,"6") setElementData(localPlayer,"points",7) return end if getElementData(localPlayer,"points") == 7 then guiSetText(lab2,"7") setElementData(localPlayer,"points",8) return end if getElementData(localPlayer,"points") == 8 then guiSetText(lab2,"8") setElementData(localPlayer,"points",9) return end if getElementData(localPlayer,"points") == 9 then guiSetText(lab2,"9") setElementData(localPlayer,"points",10) return end if getElementData(localPlayer,"points") == 10 then guiSetText(lab2,"10") guiSetEnabled(btn,false) setTimer(guiSetEnabled,5000,1,btn,true) setTimer(guiSetText,100,1,lab2,"",true) end end setElementData(localPlayer,"points",1) end ) اذا ما عجبتك الطريقة, انتظر لين يساعدونك الابطال مو ملاحظ انك ما شرحت شي بس انت كتبت الاكواد
Abu-Solo Posted January 23, 2017 Posted January 23, 2017 Just now, KinG_Himoo12 said: اشرحلي طيب يخوي مو ملاحظ انك ما شرحت شي بس انت كتبت الاكواد ماتعرف setElementData + getElementData?
Doffy Posted January 23, 2017 Author Posted January 23, 2017 1 minute ago, Abu-Solo said: ماتعرف setElementData + getElementData? getElementData ما اعرفها ابي احد يشرحها لي setElementData اعرفها
Abu-Solo Posted January 23, 2017 Posted January 23, 2017 (edited) 1 minute ago, KinG_Himoo12 said: getElementData ما اعرفها ابي احد يشرحها لي setElementData اعرفها طيب الكود شغال معك ولالا؟ كيف تعرف setElementData وما تعرف getElementData setElementData = وظيفة لـ تخزين بيانات علي مفتاح معــين وهذا رابط الداتا كلها https://wiki.multitheftauto.com/wiki/Element getElementData = هذي تجيب البيانات اللي انت حطيتها هذا الويكي حقه . https://wiki.multitheftauto.com/wiki/GetElementData Edited January 23, 2017 by Abu-Solo
Doffy Posted January 23, 2017 Author Posted January 23, 2017 1 minute ago, Abu-Solo said: طيب الكود شغال معك ولالا؟ يخوي انت ما فهمتني تمام انا ابي اول ما يضغط علي الزر ياخذ منه فلوس + يبدأ يعطيه اول ما يشتري واول ما يشتري هذي النقاط لمن يجي يضغط حرف ال ا يعطيه دم ويسحب من النقاط حقته 1 لين يصيرو 0 وما يقدر ياخذ من النقاط لانهم خلصو لين يشتري
Abu-Solo Posted January 23, 2017 Posted January 23, 2017 1 minute ago, KinG_Himoo12 said: يخوي انت ما فهمتني تمام انا ابي اول ما يضغط علي الزر ياخذ منه فلوس + يبدأ يعطيه اول ما يشتري واول ما يشتري هذي النقاط لمن يجي يضغط حرف ال ا يعطيه دم ويسحب من النقاط حقته 1 لين يصيرو 0 وما يقدر ياخذ من النقاط لانهم خلصو لين يشتري نفس الطريقة اللي انا سويتها ... بس يالله يالله تفهم شويتين getElementData + setElementData اذا فهمت ذول راح تسوي المود شوف الكلام اللي قلته فوق يمكن تستفيد ,, وترا يمديك تستفيد من الكود اللي حطيته لك #
Doffy Posted January 23, 2017 Author Posted January 23, 2017 1 minute ago, Abu-Solo said: نفس الطريقة اللي انا سويتها ... بس يالله يالله تفهم شويتين getElementData + setElementData اذا فهمت ذول راح تسوي المود شوف الكلام اللي قلته فوق يمكن تستفيد ,, وترا يمديك تستفيد من الكود اللي حطيته لك # @_@ طيب
Master_MTA Posted January 23, 2017 Posted January 23, 2017 (edited) فهمت عليك يا غالي addEventHandler("onClientGUIClick",root,function() if source==btn then triggerServerEvent("give",localPlayer) end end ) setTimer(function() if getElementData(localPlayer,"health") then guiSetText(lbl,getElementData(localPlayer,"health")) else guiSetText(lbl,"0") end end,250,0) bindKey("h","down",function() if getElementData(localPlayer,"health")>0 and getElementData(localPlayer,"health")~=0 then setElementHealth(localPlayer,100) outputChatBox('#33ff00 * done bro',255,255,255,true) else outputChatBox('*sorry you cannot do that',255,255,255,true) end end ) سيرفر addEvent("give",true) addEventHandler("give",root,function() if getPlayerMoney(source)>= 5000 then takePlayerMoney(source,5000) setAccountData(getPlayerAccount(source),"health",(getAccountData(getPlayerAccount(source),"health")or 0)+10) outputChatBox("#33ff00*تم الشراء بنجاح",source,255,255,255,true) else outputChatBox("#ff0000*ليس لديك مال كافي للشراء",source,255,255,255,true) end end ) setTimer(function() for k,v in ipairs(getElementsByType('player'))do if not isGuestAccount(getPlayerAccount(v)) then local acc = getPlayerAccount(v) if getAccountData(acc,"health") then setElementData(v,"health",getAccountData(acc,"health")) end end end end,250,0) غير مجرب Edited January 23, 2017 by Master_MTA
Doffy Posted January 23, 2017 Author Posted January 23, 2017 (edited) 1 hour ago, Abu-Solo said: نفس الطريقة اللي انا سويتها ... بس يالله يالله تفهم شويتين getElementData + setElementData اذا فهمت ذول راح تسوي المود شوف الكلام اللي قلته فوق يمكن تستفيد ,, وترا يمديك تستفيد من الكود اللي حطيته لك # هو شغال يخوي بس ما يسحب من ال lapel 14 minutes ago, Master_MTA said: فهمت عليك يا غالي addEventHandler("onClientGUIClick",root,function() if source==btn then triggerServerEvent("give",localPlayer) end end )setTimer(function() if getElementData(localPlayer,"health") then guiSetText(lbl,getElementData(localPlayer,"health")) else guiSetText(lbl,"0") end end,250,0)bindKey("h","down",function() if getElementData(localPlayer,"health")>0 and getElementData(localPlayer,"health")~=0 then setElementHealth(localPlayer,100) outputChatBox('#33ff00 * done bro',255,255,255,true) elseoutputChatBox('*sorry you cannot do that',255,255,255,true) end end ) سيرفر addEvent("give",true)addEventHandler("give",root,function() if getPlayerMoney(source)>= 5000 then takePlayerMoney(source,5000) setAccountData(getPlayerAccount(source),"health",(getAccountData(getPlayerAccount(source),"health")or 0)+10) outputChatBox("#33ff00*تم الشراء بنجاح",source,255,255,255,true) else outputChatBox("#ff0000*ليس لديك مال كافي للشراء",source,255,255,255,true) end end ) setTimer(function() for k,v in ipairs(getElementsByType('player'))do if not isGuestAccount(getPlayerAccount(v)) then local acc = getPlayerAccount(v) if getAccountData(acc,"health") then setElementData(v,"health",getAccountData(acc,"health")) end end end end,250,0) غير مجرب + كل مره اجي اشتري الاقيه بدأ من اول 1 وكمان يعطيني ونا ما معي نقاط @_@ Edited January 23, 2017 by KinG_Himoo12 1
Master_MTA Posted January 23, 2017 Posted January 23, 2017 (edited) addEvent("give",true) addEventHandler("give",root,function() if getPlayerMoney(source)>= 5000 then takePlayerMoney(source,5000) setAccountData(getPlayerAccount(source),"health",(getElementData(source,"health")or 0)+10) outputChatBox("#33ff00*تم الشراء بنجاح",source,255,255,255,true) else outputChatBox("#ff0000*ليس لديك مال كافي للشراء",source,255,255,255,true) end end ) بدل هذا بيه 4 minutes ago, KinG_Himoo12 said: هو شغال يخوي بس ما يسحب من ال lapel + كل مره اجي اشتري الاقيه بدأ من اول 1 وكمان يعطيني ونا ما معي نقاط @_@ معليش اصلا ما فهمت عليك وش +1 قصدك +10 مافي 1 Edited January 23, 2017 by Master_MTA
Doffy Posted January 23, 2017 Author Posted January 23, 2017 2 minutes ago, Master_MTA said: addEvent("give",true)addEventHandler("give",root,function() if getPlayerMoney(source)>= 5000 then takePlayerMoney(source,5000) setAccountData(getPlayerAccount(source),"health",(getElementData(source,"health")or 0)+10) outputChatBox("#33ff00*تم الشراء بنجاح",source,255,255,255,true) else outputChatBox("#ff0000*ليس لديك مال كافي للشراء",source,255,255,255,true) end end ) بدل هذا بيه برضو نفس القصة
Doffy Posted January 23, 2017 Author Posted January 23, 2017 Just now, Master_MTA said: طيب وش رايك تصورلي صوره عشان توضح لي طيب بعد ما اصورها كيف ارسلها لك ؟
Doffy Posted January 23, 2017 Author Posted January 23, 2017 Just now, Master_MTA said: ارفعها على موقع اوك لحضة ذولي صورتين ذي اول صورة وذي ثاني صورة
Master_MTA Posted January 23, 2017 Posted January 23, 2017 اها اخي هل غيرت هذي؟ guiSetText(lbl,getElementData(localPlayer,"health")) وهذي guiSetText(lbl,"0") غير lbl if getElementData(localPlayer,"health") or 0 >0 and getElementData(localPlayer,"health") or 0 ~=0 then وغير هذا السطر
' A F . Posted January 23, 2017 Posted January 23, 2017 انت تقصد م تتحدث يعني العدد يجي نفس ماهو ؟ كذا استخدم onClientRender guiGetVisible getElementData guiSetText
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