' A F . Posted March 24, 2015 Share Posted March 24, 2015 السلام عليكم ورحمة الله وبركاته . طبعا اليوم واجهتني مشكلة ب كود سويته , يجني ب الديبوق باد ارقمنت في takePlayerMoney . انا ابيه يسحب جميع فلوس الاعبين , function removeAllMoney ( player ) players = getElementsByType("player") for i,v in ipairs(players) do takePlayerMoney( player, v ) local name1 = getPlayerName(player) outputChatBox("* [Money-System] : [ "..name1.." ] هاذا الاعب قام بسحب جميع فلوس الاعبين ",v,255,255,0,true) end end addCommandHandler("removeAll", removeAllMoney) اتمنى الافاده ~ Link to comment
shwaeki Posted March 24, 2015 Share Posted March 24, 2015 function removeAllMoney ( player , cmd , Money ) if Money and tonumber ( Money ) then for i,v in ipairs(getElementsByType("player")) do takePlayerMoney( v, tonumber ( Money ) ) outputChatBox("* [Money-System] : [ "..getPlayerName(player).." ] هاذا الاعب قام بسحب جميع فلوس الاعبين ",v,255,255,0,true) end end end addCommandHandler("removeAll", removeAllMoney) عشين تحدد كم الفلوس يلي تسحبها اكتب removeAll و عدد الفلوس مثال removeAll 500 Link to comment
' A F . Posted March 24, 2015 Author Share Posted March 24, 2015 يعطيك العافيه شويكي , لاكن هاذا سويته قبل , وانا ابيه يسحب كل فلوس السيرفر بدون م يحدد اقدر ولا ؟ Link to comment
shwaeki Posted March 24, 2015 Share Posted March 24, 2015 function removeAllMoney ( player ) for i,v in ipairs(getElementsByType("player")) do setPlayerMoney ( v, 0 ) outputChatBox("* [Money-System] : [ "..getPlayerName(player).." ] هاذا الاعب قام بسحب جميع فلوس الاعبين ",v,255,255,0,true) end end addCommandHandler("removeAll", removeAllMoney) Link to comment
' A F . Posted March 24, 2015 Author Share Posted March 24, 2015 يعطيك ألفَ ععآفيهة , تمت الافادهة ------------ طلب فنكشنات , يسحب الفلوس من لاعب معين , مثال remove ProGamer 1000 Link to comment
shwaeki Posted March 24, 2015 Share Posted March 24, 2015 getPlayerFromName takePlayerMoney الله يعافيك Link to comment
' A F . Posted March 24, 2015 Author Share Posted March 24, 2015 تفضل هاذا الكود الي سويته ويسحب فلوس لاكن الدي بوق يقول ERROR: Money/server.lua:26:attempt to concatenate a userdata value الكود function removeMoneyFromName (player, cmd, Name , money) takePlayerMoney(player, tonumber(money)) outputChatBox("*[Money-System] : [ "..getPlayerName(player).." ] هاذا الاعب قام بسحب فلوس من [ "..getPlayerFromName(Name).." ] ",player,255,0,0,true) end addCommandHandler("removeMoney", removeMoneyFromName) Link to comment
shwaeki Posted March 24, 2015 Share Posted March 24, 2015 function removeMoneyFromName (player, cmd, Name , money) if getPlayerFromName(Name) and tonumber(money) then takePlayerMoney(getPlayerFromName(Name), tonumber(money)) outputChatBox("*[Money-System] : [ "..getPlayerName(player).." ] هاذا الاعب قام بسحب فلوس من [ "..Name.." ] ",player,255,0,0,true) end end addCommandHandler("removePlayerMoney", removeMoneyFromName) removePlayerMoney PlayerName Money Link to comment
' A F . Posted March 25, 2015 Author Share Posted March 25, 2015 * تمت الافآدهة , يعطيك العافية 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