kamel10 Posted July 11, 2014 Posted July 11, 2014 ابي مود توزيع الفلوس وابي بدال هذا givePlayerMoney (getRootElement(),amount) هذا setElementData(getRootElement(), "Money", (getElementData(getRootElement(), "Money") or 0) + amount)
kamel10 Posted July 11, 2014 Author Posted July 11, 2014 يعني انا ابيه يعمل على مودات قراند يعني يوزع الفلوس ب دي setElementData(getRootElement(), "Money", (getElementData(getRootElement(), "Money") or 0) + amount)
shwaeki Posted July 11, 2014 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)
kamel10 Posted July 11, 2014 Author 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)
#DRAGON!FIRE Posted July 11, 2014 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 )
jafar Posted July 11, 2014 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 خارج اللوب.
kamel10 Posted July 11, 2014 Author Posted July 11, 2014 بس بدلت outputChatBox الى exports ["guimessages"] : outputServer
#DRAGON!FIRE Posted July 11, 2014 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 خارج اللوب. ما في مشكلة لو قفلت اللوب وحطيت مخرج الشات برضو ما في مشكلة هو ممكن تجي مشكلة يكرر بس ما اعتقد تجي
jafar Posted July 11, 2014 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 خارج اللوب. ما في مشكلة لو قفلت اللوب وحطيت مخرج الشات برضو ما في مشكلة هو ممكن تجي مشكلة يكرر بس ما اعتقد تجي التكرار راح يطلع بعدد اللاعبين الموجودين
Recommended Posts