кιηg-αвα∂у Posted May 17, 2013 Share Posted May 17, 2013 -- # Server Side ! PrestegeTimer = { } canGiveM = true addEventHandler("onPlayerCommand",getRootElement(), function ( cmd ) if ( cmd == "giveM" ) then if canGiveM == false then outputChatBox('aze is started', source, 255, 0, 0, false) return end for _,v in next,getElementsByType("player") do givePlayerMoney ( v,2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) end elseif ( cmd == "aze" ) then if isTimer ( PrestegeTimer[source] ) then killTimer ( PrestegeTimer[source] ) canGiveM = true return end canGiveM = false PrestegeTimer[source] = setTimer ( function ( source ) for _,v in next,getElementsByType ( "player" ) do givePlayerMoney ( v,2500 ) outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) end end,600000,0,v ) end end ) Link to comment
iMr.Dawix~# Posted May 17, 2013 Share Posted May 17, 2013 اذا ما ضبط كود كينق عبادي جرب ملاحظة: كود ملك لبرستيجج -- # Server Side ! PrestegeTimer = { } addEventHandler("onPlayerCommand",getRootElement(), function ( cmd ) if ( cmd == "giveM" ) then if getElementData(source,"CanSend") == false then return end setElementData(source,"CanSend",true) for _,v in next,getElementsByType("player") do givePlayerMoney ( v,2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) end elseif ( cmd == "aze" ) then if isTimer ( PrestegeTimer[source] ) then killTimer ( PrestegeTimer[source] ) end if getElementData(source,"CanSend" == true return end setElementData(source,"CanSend",false) PrestegeTimer[source] = setTimer ( function ( source ) for _,v in next,getElementsByType ( "player" ) do givePlayerMoney ( v,2500 ) outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) end end,600000,0,v ) end end ) ^يلحس شوي^ Link to comment
|Mr|-Talal07-| Posted May 18, 2013 Share Posted May 18, 2013 انا ابي اسئل سؤال لبرستيج اذا انا كتبت aze وانت كتبت و ابوشنب و صاحب الكود ما تظن انه بيسير فيه 4 تيمرات ؟؟؟ Link to comment
AboShanab Posted May 18, 2013 Share Posted May 18, 2013 انا ابي اسئل سؤال لبرستيجاذا انا كتبت aze وانت كتبت و ابوشنب و صاحب الكود ما تظن انه بيسير فيه 4 تيمرات ؟؟؟ وضح شوي *_* Link to comment
S4MuEL Posted May 18, 2013 Author Share Posted May 18, 2013 @Talal عآد لممآ آكتب aze يوقققفف آلتآيممر ؟ مآ يوآصصل ..\ Link to comment
кιηg-αвα∂у Posted May 18, 2013 Share Posted May 18, 2013 إنلححسس ممخي , شششويذذ برستيج سواها بجدول يعني كل لاعب له تايمر واحد Link to comment
K1NG Posted May 18, 2013 Share Posted May 18, 2013 المقصود من كلام الأخ طلال إنه الحين لو كل لاعب كتب الكوماند رح يسوي تايمرات كثيرة مرة .. وممكن يصير كل دقايق يوزع فلوس .. يعني التايمر ما رح يضل كل ساعة .. لأنه يصير أكثر من تايمر .. ومختلفة بأوقاتها .. لأنه الأخ برستيج مسوي جدول .. ولكل لاعب تايمر خاص فيه .. لازم يلغي الجدول ويسوي تايمر للكل .. ولما أحد يسوي الكوماند إذا كان التايمر شغال يسوي كيل تايمر أو ريتيرن وبس # Link to comment
кιηg-αвα∂у Posted May 18, 2013 Share Posted May 18, 2013 جرب addCommandHandler('aze', function( playerSource ) if isTimer( sendAll ) then killTimer( sendAll ) outputChatBox('تم ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end sendAll = setTimer( function() for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", root, 0, 255, 0, false) end end,600000,0,v ) addCommandHandler('giveM', function( playerSource ) if isTimer( sendAll ) then outputChatBox('يجب ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) end end ) تشغل التوزيع التلقائي واذا كتبتها مره ثانية تطفيه aze Link to comment
K1NG Posted May 18, 2013 Share Posted May 18, 2013 -- # Server Side ! PrestegeTimer = { } addEventHandler("onPlayerCommand",getRootElement(), function ( cmd ) if ( cmd == "giveM" ) then if getElementData(source,"CanSend") == false then return end for _,v in next,getElementsByType("player") do givePlayerMoney ( v,2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) end elseif ( cmd == "aze" ) then if isTimer ( PrestegeTimer[source] ) then killTimer ( PrestegeTimer[source] ) setElementData(source,"CanSend",true) return end setElementData(source,"CanSend",false) PrestegeTimer[source] = setTimer ( function ( source ) for _,v in next,getElementsByType ( "player" ) do givePlayerMoney ( v,2500 ) outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) end end,600000,0,v ) end end ) root أخي برستيج .. الحين بسطر 10 ليه تجيب كل اللاعبين من الجدول ورجة ؟ ليه ما تستخدم وبسطر 19 مسوي نفس الشي ؟ جايب اللاعبين من الجدول ؟ + بالفنكشن حق التايمر .. دام ما تبي تستخدمها ؟ source بسطر رقم 18 ليه معرف + أقدر أعرف الفايدة منه ؟ "v"بنهاية التايمر حاط أرقمنت زيادة بسطر رقم 23 إلي هو ------------------ جرب addCommandHandler('aze', function( playerSource ) if isTimer( sendAll ) then killTimer( sendAll ) outputChatBox('تم ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end sendAll = setTimer( function() for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", root, 0, 255, 0, false) end end,600000,0,v ) addCommandHandler('giveM', function( playerSource ) if isTimer( sendAll ) then outputChatBox('يجب ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) end end ) تشغل التوزيع التلقائي واذا كتبتها مره ثانية تطفيه aze ؟ root طريقتكـ صحيحة لكن بسطر 7 + 16 ليه جايب كل اللاعبين من الجدول ؟ ليه ما تستخدم Link to comment
кιηg-αвα∂у Posted May 18, 2013 Share Posted May 18, 2013 ؟ root طريقتكـ صحيحة لكن بسطر 7 + 16 ليه جايب كل اللاعبين من الجدول ؟ ليه ما تستخدم انا متعود استخدم طريقة الجدول وماتوقع في فرق ؟ Link to comment
AboShanab Posted May 18, 2013 Share Posted May 18, 2013 جرب addCommandHandler('aze', function( playerSource ) if isTimer( sendAll ) then killTimer( sendAll ) outputChatBox('تم ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end sendAll = setTimer( function() for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", root, 0, 255, 0, false) end end,600000,0,v ) addCommandHandler('giveM', function( playerSource ) if isTimer( sendAll ) then outputChatBox('يجب ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) end end ) تشغل التوزيع التلقائي واذا كتبتها مره ثانية تطفيه aze عبادي كودك غلط التصحيح addCommandHandler('aze', function( playerSource ) if isTimer( sendAll ) then killTimer( sendAll ) outputChatBox('تم ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end sendAll = setTimer( function() for i,v in ipairs ( getElementsByType( 'player' ) ) do givePlayerMoney( v, 2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", root, 0, 255, 0, false) end end,600000,0,v ) addCommandHandler('giveM', function( playerSource ) if isTimer( sendAll ) then outputChatBox('يجب ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end for i,v in ipairs ( getElementsByType( 'player' ) ) do givePlayerMoney( v, 2500 ) end end ) Link to comment
K1NG Posted May 18, 2013 Share Posted May 18, 2013 ؟ root طريقتكـ صحيحة لكن بسطر 7 + 16 ليه جايب كل اللاعبين من الجدول ؟ ليه ما تستخدم انا متعود استخدم طريقة الجدول وماتوقع في فرق ؟ rootأدري إنه مافي فرق بس أقصد بدل ما تمر على كل اللاعبين من الجدول تقدر تختصر بـ يعني بدل ما تسوي كذا for _, v in ipairs ( getElementsByType ( 'plyaer' ) ) do givePlayerMoney ( v, 2500 ) outputChatBox ( "* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", v, 0, 255, 0, true ) end تسوي كذا .. givePlayerMoney ( root, 2500 ) outputChatBox ( "* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", root, 0, 255, 0, true ) + أقدر أعرف الفايدة منه ؟ "v" ليه حاط أرقمنت زيادة بسطر 11 بنهاية التايمر إلي هو ----------------- جرب addCommandHandler('aze', function( playerSource ) if isTimer( sendAll ) then killTimer( sendAll ) outputChatBox('تم ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end sendAll = setTimer( function() for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", root, 0, 255, 0, false) end end,600000,0,v ) addCommandHandler('giveM', function( playerSource ) if isTimer( sendAll ) then outputChatBox('يجب ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) end end ) تشغل التوزيع التلقائي واذا كتبتها مره ثانية تطفيه aze عبادي كودك غلط التصحيح addCommandHandler('aze', function( playerSource ) if isTimer( sendAll ) then killTimer( sendAll ) outputChatBox('تم ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end sendAll = setTimer( function() for i,v in ipairs ( getElementsByType( 'player' ) ) do givePlayerMoney( v, 2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", root, 0, 255, 0, false) end end,600000,0,v ) addCommandHandler('giveM', function( playerSource ) if isTimer( sendAll ) then outputChatBox('يجب ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end for i,v in ipairs ( getElementsByType( 'player' ) ) do givePlayerMoney( v, 2500 ) end end ) تقدر تقول لنا إيش الغلط يَ بطل؟ لأنه ماشوف فيه فرق بين كودكـ وكود عبادي خخ .. Link to comment
кιηg-αвα∂у Posted May 18, 2013 Share Posted May 18, 2013 بو شنب ناسخ كودي وتقول تصحيح Link to comment
|Mr|-Talal07-| Posted May 18, 2013 Share Posted May 18, 2013 time = nil addCommandHandler("aze", function (player) if isTimer(time) then killTimer(time) time = nil outputChatBox("** The Giving Stoped !!",player,255,0,0) else time = setTimer(function () for _,ply in ipairs(getElementsByType("player")) do givePlayerMoney(ply,2500) outputChatBox("** The Admin Has Sent 2500$ To All Players !",ply,0,255,0) end end,600000,0) end end ) addCommandHandler("giveM", function (player) if isTimer(time) then outputChatBox("** You Can't Send Now",player,255,0,0) else for _,pl in ipairs(getElementsByType("player")) do givePlayerMoney(pl,2500) outputChatBox("** The Admin Has Sent 2500$ To All Players !",pl,0,255,0) end end end ) المساعده رقم 600 ض2 Link to comment
AboShanab Posted May 19, 2013 Share Posted May 19, 2013 جرب addCommandHandler('aze', function( playerSource ) if isTimer( sendAll ) then killTimer( sendAll ) outputChatBox('تم ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end sendAll = setTimer( function() for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !", root, 0, 255, 0, false) end end,600000,0,v ) addCommandHandler('giveM', function( playerSource ) if isTimer( sendAll ) then outputChatBox('يجب ايقاف التوزيع التلقائي', playerSource, 255, 255, 0, false) return end for i,v in ipairs ( getElementsByType( 'plyaer' ) ) do givePlayerMoney( v, 2500 ) end end ) تشغل التوزيع التلقائي واذا كتبتها مره ثانية تطفيه aze الغغلط = plyaer التصحيح = player 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