S4MuEL Posted May 17, 2013 Share Posted May 17, 2013 آلسسلآمم عليكمم , آنآ عندي ممود يوزع ع جميع لآععبي آلسسيرففر ففلوس , بـ كوممند , آبي إذآ كتبت ممثلآ aze يتحول التوزيع تلققآئي من غير مآ آكتب بـ كومند ! وآلففلوس تتوزع كل 10 دققآيقق .. وششش آلففنكشنآت ؟ Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 addCommandHandler ipairs or next getElementsByType givePlayerMoney setTimer Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 هذآ آللي عرففت آسسويهة ! -_-" function Give() players = getElementsByType("player") for _,v in next( Players ) do givePlayerMoney(v,2500) end addCommandHandler("giveM",Give) addCommandHandler("aze", players = getElementsByType("player") for _,v in next( Players ) do setTimer( function() givePlayerMoney(v,2500) end,10000,1) Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 -- # Server Side ! addCommandHandler("aze", function ( ) setTimer ( function ( ) 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 ) end ) Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 هذآ يعططي اللآعبين ففلوس , لمآ تكتب آلكومند يصير يوزع كل سسآعةة ؟ مو زي يلي آنآ آبيه , شيكـ ع كودي , وآففهمني ! <3 Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 هذا تكتب بآف 8 aze يوزع للكل ذذ مبلغ 2500 كل 10 دقايق # و اعتقد الكود يسبب لاق استخدم هـ الكود افضل # -- # Server Side ! PrestegeTimer = { } addCommandHandler("aze", function ( player ) if ( isTimer ( PrestegeTimer[player] ) ) then killTimer ( PrestegeTimer[player] ) PrestegeTimer[player] = nil end PrestegeTimer[player] = setTimer ( function ( ) 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 ) end ) Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 آشكركـ آخخي , بسس ممآ ففي ططريققةة لـ نففس ففكرتي ؟ ! Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 ماهو هذي فكرتك ؟ قلت لي تبي تكتب aze ويصير يوزع كل 10 دقايق مبلغ 2500 صح ؟ هذا سويتة لك فوق .. Link to comment
AboShanab Posted May 17, 2013 Share Posted May 17, 2013 كود بريستيج شغال كل 10 دقايق يعطي الاعب 2500 احسسب انت الـ 1000 = ثانية 600 = 10 دقايق بالثواني اضرب 600 x 1000 = 600000 يعني مضبوط بريستيج Link to comment
AboShanab Posted May 17, 2013 Share Posted May 17, 2013 استبدل 2500 بـ مقدار الفلوس اللي تبيها تتوزع كل عشر دقايق *_* Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 @برستيجج شفف وركز ممعي , آنآ لمآ آكتب giveM يوزع ع آلسيرففر 2500 , ولمآ آكتب aze يصير يوزع تلققآئي كل 10 دققآيقق 2500 من دون مآ آكتب giveM ففهمتني ؟ Link to comment
AboShanab Posted May 17, 2013 Share Posted May 17, 2013 (edited) واذا تبي غيره .. جميع الحقوق محفوظة لدى عناد .. -- # Server Side ! addCommandHandler("giveM", function () local money = math.random (5000,15000) givePlayerMoney( getRootElement(), money ) outputChatBox("* #000000[ #00ff00 $"..money.." #000000] #0099cc This Money has been sent to All players #ff0000❤" ,getRootElement(),255,0,0,true) end ) -- PrestegeTimer = { } addCommandHandler("aze", function ( player ) if ( isTimer ( PrestegeTimer[player] ) ) then killTimer ( PrestegeTimer[player] ) PrestegeTimer[player] = nil end PrestegeTimer[player] = setTimer ( function ( ) 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 ) end ) لم يتم التجربه Edited May 17, 2013 by Guest Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 @Aboshanab حآففز هنآ مآ لهة دخخل آبد , بـ ففكرتي .. يعني آبعد ششوي ! :\ Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 -- # Server Side ! PrestegeTimer = { } addEventHandler("onPlayerCommand",getRootElement(), function ( cmd ) if ( cmd == "giveM" ) then 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] ) PrestegeTimer[player] = nil end PrestegeTimer[source] = setTimer ( function ( ) 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 ) end end ) Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 إيهة كذآ ظظبطط , بس ي برستيج آبي إذآ كتبت giveM بعد مآ يصير التوزيع التلقآئي مآ تققدر توزعع , الـ giveM آبيهآ تتففعل بعد مآ يتعطل التوزيع التلقآئي بـ إعآدةة كتآبةة aze ! Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 يعني الحين لو تكتب aze يتفعل التلقائي لو تكتبها ثانية وكان مفعل التلقائي يوقفة ؟ Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 يوب , وآبيهة إذآ وققفف آلتلقآئي يققدر يوزع بالـ giveM آمآ إذآ كآن التوزيع التلقآئي شغآل فـ لآ !! Link to comment
AboShanab Posted May 17, 2013 Share Posted May 17, 2013 PrestegeTimer = { } addEventHandler("onPlayerCommand",getRootElement(), function ( cmd ) if ( cmd == "giveM" ) then if getElementData ( player, "iscmd" ) == false then for _,v in next,getElementsByType("player") do givePlayerMoney ( v,2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) setElementData( player, "iscmd", true ) end elseif ( cmd == "aze" ) then if ( isTimer ( PrestegeTimer[source] ) ) then killTimer ( PrestegeTimer[source] ) PrestegeTimer[player] = nil setElementData( player, "iscmd", false ) end PrestegeTimer[source] = setTimer ( function ( ) 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 ) elseif ( cmd == "aze" ) then if setElementData( player, "iscmd", false ) then setElementData( player, "iscmd", true ) else if setElementData( player, "iscmd", true ) then setElementData( player, "iscmd", false ) end end end end end ) لم يتم التجربة !! Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 صصآر ممآ يششتغل آصصل ! :\ Link to comment
S4MuEL Posted May 17, 2013 Author Share Posted May 17, 2013 ممآ عليكـ , بالديبقق مآ يققول شي !!! Link to comment
кιηg-αвα∂у Posted May 17, 2013 Share Posted May 17, 2013 (edited) PrestegeTimer = { } local canGiveM = nil addEventHandler("onPlayerCommand",getRootElement(), function ( cmd ) if ( cmd == "giveM" ) then if canGiveM then for _,v in next,getElementsByType("player") do givePlayerMoney ( v,2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) end end elseif ( cmd == "azeStop" ) then if ( isTimer ( PrestegeTimer[source] ) ) then killTimer ( PrestegeTimer[source] ) PrestegeTimer[player] = nil canGiveM = true else outputChatBox("aze is stoped", source, 255, 0, 0, false) end elseif ( cmd == "aze" ) then if ( isTimer ( PrestegeTimer[source] ) ) then killTimer ( PrestegeTimer[source] ) PrestegeTimer[player] = nil canGiveM = true end PrestegeTimer[source] = setTimer ( function ( ) for _,v in next,getElementsByType ( "player" ) do givePlayerMoney ( v,2500 ) canGiveM = false outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) end end,600000,0 ) end end ) azeStop لآيقاف التوزيع التلقائي اكتب Edited May 17, 2013 by Guest Link to comment
AboShanab Posted May 17, 2013 Share Posted May 17, 2013 Server Side ! addCommandHandler ( "giveM", function (player) if getElementData ( player, "iscmd" ) == false then for _,v in next,getElementsByType("player") do givePlayerMoney ( v,2500 ) outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) end end end ) -- addCommandHandler ( "aze1", function (player) if ( isTimer ( PrestegeTimer[source] ) ) then killTimer ( PrestegeTimer[source] ) PrestegeTimer[player] = nil setElementData( player, "iscmd", false ) end end ) -- addEventHandler("onPlayerCommand",getRootElement(), function ( cmd ) if ( cmd == "aze2" ) then PrestegeTimer[source] = setTimer ( function ( ) 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 ) end end ) ججرب اظن ما يمديك تسوي cmd فيه شيين اذا كتبت aze1 يوقف التوزيع التلقائي ويخليه يمديك توزع giveM واذا كتبت aze2 يشغل التوزيع التلقائي لم يتم التجربه !! Link to comment
iPrestege 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 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 ) 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