Doffy Posted January 23, 2017 Author Share Posted January 23, 2017 3 minutes ago, Master_MTA said: اها اخي هل غيرت هذي؟ guiSetText(lbl,getElementData(localPlayer,"health")) وهذي guiSetText(lbl,"0") غير lbl if getElementData(localPlayer,"health") or 0 >0 and getElementData(localPlayer,"health") or 0 ~=0 then وغير هذا السطر ادري غيرت وبرضو Link to comment
Master_MTA Posted January 23, 2017 Share Posted January 23, 2017 1 minute ago, KinG_Himoo12 said: ادري غيرت وبرضو مستحيل يقلبي جربت الكود انا +_+ Link to comment
Doffy Posted January 23, 2017 Author Share Posted January 23, 2017 1 minute ago, Master_MTA said: مستحيل يقلبي جربت الكود انا +_+ اجل طيب بجرب ثاني Link to comment
Abu-Solo Posted January 23, 2017 Share Posted January 23, 2017 3 minutes ago, KinG_Himoo12 said: ادري غيرت وبرضو تأكد من تغيير اسم الليبل بـ اسم الليبل حقك ^^ Link to comment
Doffy Posted January 23, 2017 Author Share Posted January 23, 2017 1 minute ago, Abu-Solo said: تأكد من تغيير اسم الليبل بـ اسم الليبل حقك ^^ يخوي تأكدت ونفس القصة يعطيني وانا ما معي نقاط حتي + كمان ما ينقص من اللابيل Link to comment
Abu-Solo Posted January 23, 2017 Share Posted January 23, 2017 2 minutes ago, KinG_Himoo12 said: يخوي تأكدت ونفس القصة يعطيني وانا ما معي نقاط حتي + كمان ما ينقص من اللابيل الاخ ماستر يقول انه شغال عنده Link to comment
Doffy Posted January 23, 2017 Author Share Posted January 23, 2017 Just now, Abu-Solo said: الاخ ماستر يقول انه شغال عنده طيب انا موب شغال + جرب انت لو موب مصدق سوي زي الي انا مسويه وجرب @_@ Link to comment
N3xT Posted January 23, 2017 Share Posted January 23, 2017 طيب عطني الكود كامل عشان أساعدك زين ، وين كود زر الشراء؟ الحين فهمت اللي تبي تسويه ، تفضل Client healthPoint = 0 addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == GUIEditor.button[2] ) then if ( healthPoint <= 10 ) then triggerServerEvent ( "buy:Health", localPlayer, localPlayer ) guiAntiFlood(GUIEditor.button[2],900) healthPoint = healthPoint + 1 end end end ) bindKey("h","down", function ( ) if ( healthPoint >= 1 ) then setElementHealth(localPlayer,100) healthPoint = healthPoint - 1 guiSetText(GUIEditor.label[5],healthPoint) else outputChatBox('# You dont have a health point.',255,255,255,true) end end ) Server addEvent("buy:Health",true) addEventHandler("buy:Health", root, function ( aPlayer ) if ( getPlayerMoney(aPlayer) >= 10000 ) then takePlayerMoney(aPlayer, 10000) outputChatBox('# You bought a health point succesfully.',255,255,255,true) else outputChatBox('# You dont have enough money.',255,255,255,true) end end ) Link to comment
Master_MTA Posted January 23, 2017 Share Posted January 23, 2017 (edited) 1 hour ago, N3xT said: طيب عطني الكود كامل عشان أساعدك زين ، وين كود زر الشراء؟ الحين فهمت اللي تبي تسويه ، تفضل Client healthPoint = 0 addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == GUIEditor.button[2] ) then if ( healthPoint <= 10 ) then triggerServerEvent ( "buy:Health", localPlayer, localPlayer ) guiAntiFlood(GUIEditor.button[2],900) healthPoint = healthPoint + 1 end end end ) bindKey("h","down", function ( ) if ( healthPoint >= 1 ) then setElementHealth(localPlayer,100) healthPoint = healthPoint - 1 guiSetText(GUIEditor.label[5],healthPoint) else outputChatBox('# You dont have a health point.',255,255,255,true) end end ) Server addEvent("buy:Health",true) addEventHandler("buy:Health", root, function ( aPlayer ) if ( getPlayerMoney(aPlayer) >= 10000 ) then takePlayerMoney(aPlayer, 10000) outputChatBox('# You bought a health point succesfully.',255,255,255,true) else outputChatBox('# You dont have enough money.',255,255,255,true) end end ) هو يبيها محفوظه + اتوقع الكود حقي مافيه خطا؟ Edited January 23, 2017 by Master_MTA 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