Doffy Posted January 11, 2017 Share Posted January 11, 2017 ممكن مساعدة في هذا الكود انا ابيه يعطيك فلوس كل نص ساعة نقود حافز بس مو عارف اضبط الكود لانه حتي ونا مسجل يقولي برضو لازم تسجيل الدخول addEvent ("giveM",true) addEventHandler ("giveM",root, function () if not isGuestAccount(getPlayerAccount(source)) then return outputChatBox ("يجب تسجيل الدخول اولاً",source,255,5,5) end if not getAccountData (getPlayerAccount(source),"Mon") then setAccountData (getPlayerAccount(source),"Mon",true) givePlayerMoney (source,50000) l = source outputChatBox ("تم إعطائك نقود",source,2,255,5) setTimer(function() givePlayerMoney(l,50000) outputChatBox ("تم إعطائك نقود",l,2,255,5) if getAccountData (getPlayerAccount(source),"Mon") then setAccountData (getPlayerAccount(source),"Mon",false) end end,30*60000,0) addEventHandler ("onPlayerLogout",source, function (_,acc) setAccountData (acc,"Mon",false) end) else outputChatBox ("تم تفعيل الطريقة",source,255,5,5) end end ) Link to comment
^iiEcoo'x_) Posted January 11, 2017 Share Posted January 11, 2017 جرب addEvent ("giveM",true) addEventHandler ("giveM",root, function (player) local account = getPlayerAccount(player) if not ( isGuestAccount( accountName ) ) then if not getAccountData (account,"Mon") then setAccountData (account,"Mon",true) givePlayerMoney (player,50000) outputChatBox ("تم إعطائك نقود",player,2,255,5) end end end ) function removeAccountData ( playerAccount, data ) if ( playerAccount ~= "" ) and ( data ~= "" ) then if getAccount ( playerAccount ) then local dataName = getAccountData(playerAccount, data) if ( dataName ~= nil ) or ( dataName ~= "" ) then setAccountData(playerAccount, data, false) end end end end setTimer(function(player) local account = getPlayerAccount(player) if not ( isGuestAccount( accountName ) ) then local data = getAccountData (account,"Mon") if ( data == "true" ) removeAccountData ( account , "Mon") givePlayerMoney(player,50000) outputChatBox ("تم إعطائك نقود",player,2,255,5) end,30*60000,0) addEventHandler ("onPlayerLogout",source, function (_,acc) removeAccountData ( acc , "Mon") end ) Link to comment
Doffy Posted January 11, 2017 Author Share Posted January 11, 2017 52 minutes ago, KinG_Himoo12 said: ممكن مساعدة في هذا الكود انا ابيه يعطيك فلوس كل نص ساعة نقود حافز بس مو عارف اضبط الكود لانه حتي ونا مسجل يقولي برضو لازم تسجيل الدخول addEvent ("giveM",true) addEventHandler ("giveM",root, function () if not isGuestAccount(getPlayerAccount(source)) then return outputChatBox ("يجب تسجيل الدخول اولاً",source,255,5,5) end if not getAccountData (getPlayerAccount(source),"Mon") then setAccountData (getPlayerAccount(source),"Mon",true) givePlayerMoney (source,50000) l = source outputChatBox ("تم إعطائك نقود",source,2,255,5) setTimer(function() givePlayerMoney(l,50000) outputChatBox ("تم إعطائك نقود",l,2,255,5) if getAccountData (getPlayerAccount(source),"Mon") then setAccountData (getPlayerAccount(source),"Mon",false) end end,30*60000,0) addEventHandler ("onPlayerLogout",source, function (_,acc) setAccountData (acc,"Mon",false) end) else outputChatBox ("تم تفعيل الطريقة",source,255,5,5) end end ) Quote Quote اخوي انا ابيه اول ما تضغط علي بوتون مو بالشات Link to comment
Abu-Solo Posted January 11, 2017 Share Posted January 11, 2017 (edited) 6 minutes ago, KinG_Himoo12 said: اخوي انا ابيه اول ما تضغط علي بوتون مو بالشات آطرح الكود حق الكلينت Edited January 11, 2017 by Abu-Solo Link to comment
Doffy Posted January 11, 2017 Author Share Posted January 11, 2017 Just now, Abu-Solo said: آطرح الكود حق الكلينت خذ addEventHandler("onClientGUIClick",GUIEditor.button[2], function() triggerServerEvent ("giveM",localPlayer) end,false) Link to comment
Master_MTA Posted January 11, 2017 Share Posted January 11, 2017 (edited) addEvent("giveM",true) addEventHandler("giveM",root,function() acc=getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"mmtake")==true then return outputChatBox("#ff0000لقد اخذت النقود من قبل",source,255,255,255,true)end setAccountData(acc,"mmtake",true) givePlayerMoney(source,50000) setTimer(removeAccountData,1000*60*30,1,acc,"mmtake") setTimer(outputChatBox("#33ff00يمكنك الان اخذ النقود مره اخرى",source,255,255,255,true),1000*60*30,1) end end ) غير مجرب جرب وعطني خبر Edited January 11, 2017 by Master_MTA Link to comment
^iiEcoo'x_) Posted January 11, 2017 Share Posted January 11, 2017 Client addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[2] ) then triggerServerEvent ("giveM",localPlayer) end ) Server addEvent ("giveM",true) addEventHandler ("giveM",root, function (player) local account = getPlayerAccount(player) if not ( isGuestAccount( accountName ) ) then if not getAccountData (account,"Mon") then setAccountData (account,"Mon",true) givePlayerMoney (player,50000) outputChatBox ("تم إعطائك نقود",player,2,255,5) end end end ) function removeAccountData ( playerAccount, data ) if ( playerAccount ~= "" ) and ( data ~= "" ) then if getAccount ( playerAccount ) then local dataName = getAccountData(playerAccount, data) if ( dataName ~= nil ) or ( dataName ~= "" ) then setAccountData(playerAccount, data, false) end end end end setTimer(function(player) local account = getPlayerAccount(player) if not ( isGuestAccount( accountName ) ) then local data = getAccountData (account,"Mon") if ( data == "true" ) removeAccountData ( account , "Mon") givePlayerMoney(player,50000) outputChatBox ("تم إعطائك نقود",player,2,255,5) end,30*60000,0) addEventHandler ("onPlayerLogout",source, function (_,acc) removeAccountData ( acc , "Mon") end ) Link to comment
Doffy Posted January 11, 2017 Author Share Posted January 11, 2017 7 minutes ago, #_iMr,[E]coo said: Client addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[2] ) then triggerServerEvent ("giveM",localPlayer) end ) Server addEvent ("giveM",true) addEventHandler ("giveM",root, function (player) local account = getPlayerAccount(player) if not ( isGuestAccount( accountName ) ) then if not getAccountData (account,"Mon") then setAccountData (account,"Mon",true) givePlayerMoney (player,50000) outputChatBox ("تم إعطائك نقود",player,2,255,5) end end end ) function removeAccountData ( playerAccount, data ) if ( playerAccount ~= "" ) and ( data ~= "" ) then if getAccount ( playerAccount ) then local dataName = getAccountData(playerAccount, data) if ( dataName ~= nil ) or ( dataName ~= "" ) then setAccountData(playerAccount, data, false) end end end end setTimer(function(player) local account = getPlayerAccount(player) if not ( isGuestAccount( accountName ) ) then local data = getAccountData (account,"Mon") if ( data == "true" ) removeAccountData ( account , "Mon") givePlayerMoney(player,50000) outputChatBox ("تم إعطائك نقود",player,2,255,5) end,30*60000,0) addEventHandler ("onPlayerLogout",source, function (_,acc) removeAccountData ( acc , "Mon") end ) موب شغال 20 minutes ago, Master_MTA said: addEvent("giveM",true) addEventHandler("giveM",root,function() acc=getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"mmtake")==true then return outputChatBox("#ff0000لقد اخذت النقود من قبل",source,255,255,255,true)end setAccountData(acc,"mmtake",true) givePlayerMoney(source,50000) setTimer(removeAccountData,1000*60*30,1,acc,"mmtake") setTimer(outputChatBox("#33ff00يمكنك الان اخذ النقود مره اخرى",source,255,255,255,true),1000*60*30,1) end end ) غير مجرب جرب وعطني خبر ولا ذا كمان شغال Link to comment
Master_MTA Posted January 11, 2017 Share Posted January 11, 2017 (edited) 29 minutes ago, Master_MTA said: addEvent("giveM",true) addEventHandler("giveM",root,function() acc=getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"mmtake")==true then return outputChatBox("#ff0000لقد اخذت النقود من قبل",source,255,255,255,true)end setAccountData(acc,"mmtake",true) givePlayerMoney(source,50000) setTimer(removeAccountData,1000*60*30,1,acc,"mmtake") setTimer(outputChatBox("#33ff00يمكنك الان اخذ النقود مره اخرى",source,255,255,255,true),1000*60*30,1) end end ) غير مجرب جرب وعطني خبر تعديل بسيط addEvent("giveM",true) addEventHandler("giveM",root,function() acc=getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"mmtake")==true then return outputChatBox("#ff0000لقد اخذت النقود من قبل",source,255,255,255,true)end setAccountData(acc,"mmtake",true) givePlayerMoney(source,50000) setTimer(setAccountData,1000*60*30,1,acc,"mmtake",false) setTimer(outputChatBox("#33ff00يمكنك الان اخذ النقود مره اخرى",source,255,255,255,true),1000*60*30,1) end end ) @KinG_Himoo12 Edited January 11, 2017 by Master_MTA Link to comment
Doffy Posted January 11, 2017 Author Share Posted January 11, 2017 1 minute ago, Master_MTA said: تعديل بسيط addEvent("giveM",true)addEventHandler("giveM",root,function() acc=getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"mmtake")==true then return outputChatBox("#ff0000لقد اخذت النقود من قبل",source,255,255,255,true)end setAccountData(acc,"mmtake",true) givePlayerMoney(source,50000) setTimer(setAccountData,1000*60*30,1,acc,"mmtake",false) setTimer(outputChatBox("#33ff00يمكنك الان اخذ النقود مره اخرى",source,255,255,255,true),1000*60*30,1) end end ) برضو موب شغال :@ Link to comment
Master_MTA Posted January 11, 2017 Share Posted January 11, 2017 (edited) يا غالي انتظرت نص ساعه انت؟ وهل انت مسجل؟ وهل عطاك فلوس؟ @KinG_Himoo12 Edited January 11, 2017 by Master_MTA Link to comment
Doffy Posted January 11, 2017 Author Share Posted January 11, 2017 1 minute ago, Master_MTA said: يا غالي انتظرت نص ساعه انت؟ وهل انت مسجل؟ @KinG_Himoo12 لا انا خليت الوقت 1 دقيقة وانتظرت :@ وما جاني شي فهمت Link to comment
Master_MTA Posted January 11, 2017 Share Posted January 11, 2017 (edited) 2 minutes ago, KinG_Himoo12 said: لا انا خليت الوقت 1 دقيقة وانتظرت :@ وما جاني شي فهمت كيف خليت الوقت 1 دق اطرح بعد التعديل؟ @KinG_Himoo12 Edited January 11, 2017 by Master_MTA Link to comment
Doffy Posted January 11, 2017 Author Share Posted January 11, 2017 2 minutes ago, Master_MTA said: كيف خليت الوقت 1 دق اطرح بعد التعديل؟ addEvent("giveM",true) addEventHandler("giveM",root,function() acc=getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"mmtake")==true then return outputChatBox("#ff0000لقد اخذت النقود من قبل",source,255,255,255,true)end setAccountData(acc,"mmtake",true) givePlayerMoney(source,50000) setTimer(setAccountData,1*60*30,1,acc,"mmtake",false) setTimer(outputChatBox("#33ff00يمكنك الان اخذ النقود مره اخرى",source,255,255,255,true),1000*60*30,1) end end ) Link to comment
Master_MTA Posted January 11, 2017 Share Posted January 11, 2017 (edited) استخدم <> اولا ثانيا addEvent("giveM",true) addEventHandler("giveM",root,function() acc=getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"mmtake")==true then return outputChatBox("#ff0000لقد اخذت النقود من قبل",source,255,255,255,true)end setAccountData(acc,"mmtake",true) outputChatBox("#33ff00 اخذت النقود",source,255,255,255,true) givePlayerMoney(source,50000) setTimer(setAccountData,1000*60,1,acc,"mmtake",false)-----------------كذا دقيقه setTimer(outputChatBox("#33ff00يمكنك الان اخذ النقود مره اخرى",source,255,255,255,true),1000*60,1)-----------كذا دقيقه end end ) @KinG_Himoo12 بدله بالكود اللي معك وقولي لما تضغط الزر يجيك رساله بالشات اخذت النقود Edited January 11, 2017 by Master_MTA Link to comment
Doffy Posted January 11, 2017 Author Share Posted January 11, 2017 2 hours ago, Master_MTA said: استخدم <> اولا ثانيا addEvent("giveM",true)addEventHandler("giveM",root,function() acc=getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"mmtake")==true then return outputChatBox("#ff0000لقد اخذت النقود من قبل",source,255,255,255,true)end setAccountData(acc,"mmtake",true) outputChatBox("#33ff00 اخذت النقود",source,255,255,255,true) givePlayerMoney(source,50000) setTimer(setAccountData,1000*60,1,acc,"mmtake",false)-----------------كذا دقيقه setTimer(outputChatBox("#33ff00يمكنك الان اخذ النقود مره اخرى",source,255,255,255,true),1000*60,1)-----------كذا دقيقه end end ) @KinG_Himoo12 بدله بالكود اللي معك وقولي لما تضغط الزر يجيك رساله بالشات اخذت النقود موب شغااااااااال Link to comment
^iiEcoo'x_) Posted January 11, 2017 Share Posted January 11, 2017 سويتهـ لك لما يضغط عالزر يقفلهـ وبعد وقت معين يفتحهـ Client Side ! function guiAntiFlood(element, timer) -- To Mezo ! if getElementType ( element ) == "gui-button" then local atimer = tonumber(timer) if atimer == nil or atimer == '' or not tonumber(atimer) then error("Bad Argument the Argument 2 must number") else end guiSetEnabled(element,false) setTimer(function() guiSetEnabled(element,true) end,tonumber(atimer),1) else error("Bad Argument 1 the element must button") end end addEventHandler ( 'onClientGUIClick',root, -- حدث عند الضغط على زر function () -- وظيفة if ( source == GUIEditor.button[2] ) then -- نتحقق من اسم الزر triggerServerEvent ( "money", localPlayer ) -- ترايقر للسيرفر عشان ناخذ فلوس guiAntiFlood(GUIEditor.button[2],1800000) -- بعد نص ساعة يفتح الزر end -- نهاية if end -- نهاية الوظيفة ) -- قوس الوظيفة addEvent ( "money", true ) -- نستقبل الترايقر addEventHandler ( "money", root, -- نستقبل الترايقر function ( ) -- وظيفة givePlayerMoney(source,5000) -- اعطاء الاعب فلوس end -- نهاية الوظيفة ) -- قوس الوظيفة Link to comment
Doffy Posted January 11, 2017 Author Share Posted January 11, 2017 2 hours ago, #_iMr,[E]coo said: سويتهـ لك لما يضغط عالزر يقفلهـ وبعد وقت معين يفتحهـ Client Side ! function guiAntiFlood(element, timer) -- To Mezo ! if getElementType ( element ) == "gui-button" then local atimer = tonumber(timer) if atimer == nil or atimer == '' or not tonumber(atimer) then error("Bad Argument the Argument 2 must number") else end guiSetEnabled(element,false) setTimer(function() guiSetEnabled(element,true) end,tonumber(atimer),1) else error("Bad Argument 1 the element must button") endendaddEventHandler ( 'onClientGUIClick',root, -- حدث عند الضغط على زر function () -- وظيفةif ( source == GUIEditor.button[2] ) then -- نتحقق من اسم الزرtriggerServerEvent ( "money", localPlayer ) -- ترايقر للسيرفر عشان ناخذ فلوسguiAntiFlood(GUIEditor.button[2],1800000) -- بعد نص ساعة يفتح الزر end -- نهاية ifend -- نهاية الوظيفة) -- قوس الوظيفة addEvent ( "money", true ) -- نستقبل الترايقرaddEventHandler ( "money", root, -- نستقبل الترايقر function ( ) -- وظيفة givePlayerMoney(source,5000) -- اعطاء الاعب فلوسend -- نهاية الوظيفة ) -- قوس الوظيفة انت جربته يا صديق ؟ Link to comment
Abdul KariM Posted January 11, 2017 Share Posted January 11, 2017 حدد كيف تبي يعطيه فلوس ؟ كل نص ساعة يفتح له زر ولا كوماند Link to comment
Doffy Posted January 12, 2017 Author Share Posted January 12, 2017 17 hours ago, #_iMr,[E]coo said: سويتهـ لك لما يضغط عالزر يقفلهـ وبعد وقت معين يفتحهـ Client Side ! function guiAntiFlood(element, timer) -- To Mezo ! if getElementType ( element ) == "gui-button" then local atimer = tonumber(timer) if atimer == nil or atimer == '' or not tonumber(atimer) then error("Bad Argument the Argument 2 must number") else end guiSetEnabled(element,false) setTimer(function() guiSetEnabled(element,true) end,tonumber(atimer),1) else error("Bad Argument 1 the element must button") endendaddEventHandler ( 'onClientGUIClick',root, -- حدث عند الضغط على زر function () -- وظيفةif ( source == GUIEditor.button[2] ) then -- نتحقق من اسم الزرtriggerServerEvent ( "money", localPlayer ) -- ترايقر للسيرفر عشان ناخذ فلوسguiAntiFlood(GUIEditor.button[2],1800000) -- بعد نص ساعة يفتح الزر end -- نهاية ifend -- نهاية الوظيفة) -- قوس الوظيفة addEvent ( "money", true ) -- نستقبل الترايقرaddEventHandler ( "money", root, -- نستقبل الترايقر function ( ) -- وظيفة givePlayerMoney(source,5000) -- اعطاء الاعب فلوسend -- نهاية الوظيفة ) -- قوس الوظيفة شكرا حب الكود اشتغل 100% تمام Link to comment
Doffy Posted January 12, 2017 Author Share Posted January 12, 2017 Just now, #_iMr,[E]coo said: حياككـ الله ,, شكرا والله عندك فيس بوك ؟ Link to comment
^iiEcoo'x_) Posted January 12, 2017 Share Posted January 12, 2017 10 minutes ago, KinG_Himoo12 said: شكرا والله عندك فيس بوك ؟ سكايب mohammed.rhamnah Link to comment
Abu-Solo Posted January 12, 2017 Share Posted January 12, 2017 23 hours ago, KinG_Himoo12 said: خذ addEventHandler("onClientGUIClick",GUIEditor.button[2], function() triggerServerEvent ("giveM",localPlayer) end,false) Link to comment
Recommended Posts