kamel10 Posted July 11, 2014 Share Posted July 11, 2014 ابي مود توزيع الفلوس وابي بدال هذا givePlayerMoney (getRootElement(),amount) هذا setElementData(getRootElement(), "Money", (getElementData(getRootElement(), "Money") or 0) + amount) Link to comment
kamel10 Posted July 11, 2014 Author Share Posted July 11, 2014 يعني انا ابيه يعمل على مودات قراند يعني يوزع الفلوس ب دي setElementData(getRootElement(), "Money", (getElementData(getRootElement(), "Money") or 0) + amount) Link to comment
xX|KeMo|Xx Posted July 11, 2014 Share Posted July 11, 2014 يعني تبي يوزع المنت ترا ماراح تصير فلوس حقيقه؟ Link to comment
shwaeki Posted July 11, 2014 Share Posted July 11, 2014 تفضل الكلمة عيشن توزيع giveall addCommandHandler ( "giveall", function ( player, cmd, mon ) if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Console'))then if tonumber ( mon) ~= nil then for id, b in ipairs ( getElementsByType ( "player" ) ) do setElementData(b, "Money", (getElementData(b, "Money") or 0) + mon) outputChatBox( '$' .. ad99 .. ' بتوزيع مبلغ ' .. getPlayerName( player ) .. ' قام الادمن', root, 0, 255, 0 ) end end end end) Link to comment
kamel10 Posted July 11, 2014 Author Share Posted July 11, 2014 فيه مشكلة ما يوزع وسويت عليه بعض التعديلات addCommandHandler ( "giveall", function ( player, cmd, mon ) if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Console'))then if tonumber ( mon) ~= nil then for id, b in ipairs ( getElementsByType ( "player" ) ) do setElementData(b, "Money", (getElementData(b, "Money") or 0) + mon) outputChatBox( '#FBB917[Admin] #0000FF' .. getPlayerName( player ) .. ' #00FF00Has Give All Players #FF0000'.. ad99 ..'$ ', root, 0, 255, 0 ) end end end end) Link to comment
#DRAGON!FIRE Posted July 11, 2014 Share Posted July 11, 2014 addCommandHandler ( "GiveAll", function( player,_, Money ) if ( Money and tonumber ( Money ) ) then if ( isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( player ) ),aclGetGroup( "Console" ) ) ) then for _,players in ipairs ( getElementsByType ( "player" ) ) do setElementData( players, "Money", ( getElementData(players, "Money" ) or 0 ) + tonumber ( Money ) ) outputChatBox( "#FBB917[Admin] #0000FF"..getPlayerName( player ).." #00FF00Has Give All Players #FF0000"..tonumber ( Money ).."$", root, 0, 255, 0 ) end end end end ) Link to comment
kamel10 Posted July 11, 2014 Author Share Posted July 11, 2014 مشكور بس لما اوزع تظهر 5 مرات انه وزع Link to comment
jafar Posted July 11, 2014 Share Posted July 11, 2014 addCommandHandler ( "GiveAll", function( player,_, Money ) if ( Money and tonumber ( Money ) ) then if ( isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( player ) ),aclGetGroup( "Console" ) ) ) then for _,players in ipairs ( getElementsByType ( "player" ) ) do setElementData( players, "Money", ( getElementData(players, "Money" ) or 0 ) + tonumber ( Money ) ) outputChatBox( "#FBB917[Admin] #0000FF"..getPlayerName( player ).." #00FF00Has Give All Players #FF0000"..tonumber ( Money ).."$", root, 0, 255, 0 ) end end end end ) طلع فنكشن outputChatBox خارج اللوب. Link to comment
kamel10 Posted July 11, 2014 Author Share Posted July 11, 2014 بس بدلت outputChatBox الى exports ["guimessages"] : outputServer Link to comment
#DRAGON!FIRE Posted July 11, 2014 Share Posted July 11, 2014 addCommandHandler ( "GiveAll", function( player,_, Money ) if ( Money and tonumber ( Money ) ) then if ( isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( player ) ),aclGetGroup( "Console" ) ) ) then for _,players in ipairs ( getElementsByType ( "player" ) ) do setElementData( players, "Money", ( getElementData(players, "Money" ) or 0 ) + tonumber ( Money ) ) outputChatBox( "#FBB917[Admin] #0000FF"..getPlayerName( player ).." #00FF00Has Give All Players #FF0000"..tonumber ( Money ).."$", root, 0, 255, 0 ) end end end end ) طلع فنكشن outputChatBox خارج اللوب. ما في مشكلة لو قفلت اللوب وحطيت مخرج الشات برضو ما في مشكلة هو ممكن تجي مشكلة يكرر بس ما اعتقد تجي Link to comment
jafar Posted July 11, 2014 Share Posted July 11, 2014 addCommandHandler ( "GiveAll", function( player,_, Money ) if ( Money and tonumber ( Money ) ) then if ( isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( player ) ),aclGetGroup( "Console" ) ) ) then for _,players in ipairs ( getElementsByType ( "player" ) ) do setElementData( players, "Money", ( getElementData(players, "Money" ) or 0 ) + tonumber ( Money ) ) outputChatBox( "#FBB917[Admin] #0000FF"..getPlayerName( player ).." #00FF00Has Give All Players #FF0000"..tonumber ( Money ).."$", root, 0, 255, 0 ) end end end end ) طلع فنكشن outputChatBox خارج اللوب. ما في مشكلة لو قفلت اللوب وحطيت مخرج الشات برضو ما في مشكلة هو ممكن تجي مشكلة يكرر بس ما اعتقد تجي التكرار راح يطلع بعدد اللاعبين الموجودين Link to comment
Recommended Posts