ivor Posted August 25, 2016 Share Posted August 25, 2016 حل ؟ addCommandHandler ( "GAMXW", function (thePlayer,_,money, xp, we, ammo, time, times, after) local name = getPlayerName(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) local WE = getWeaponNameFromID(we) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then if not isTimer(GAMXWTime) and not isTimer(GAMXWAfterTime) then GAMXWAfterTime = setTimer(function() exports["guimessages"]:outputServer(root, "I دقائق I[".. time .."]I سوف يبدأ التوزيع بعد I باعطاء امر التوزيع ["..name.."]I قام المدير I", 0,255,255) outputChatBox ( "I دقائق I[".. time .."]I سوف يبدأ التوزيع بعد I باعطاء امر التوزيع ["..name.."]I قام المدير I", root, 0,255,255, true ) AllMSend = 0 AllXSend = 0 AllWSend = 0 AllSend = 0 exports["guimessages"]:outputServer(root, "I دقائق I[".. time .."]I بين كل توزيع وآخر I مرات I[".. times .."]I سوف يتم التوزيع I", 255,0,255) outputChatBox ( "I دقائق I[".. time .."]I بين كل توزيع وآخر I مرات I[".. times .."]I سوف يتم التوزيع I", root, 255,0,255, true ) GAMXWTime = setTimer(function() for i, player in ipairs(getElementsByType("player")) do if ( isElement(player) ) then setElementData(player, "Money", (getElementData(player, "Money") or 0) + money) setElementData(player, "xp", (getElementData(player, "xp") or 0) + xp) giveWeapon(player, we, ammo) end end triggerClientEvent(root, "OnSendMessage", root, "+"..xp.." Xp", 255, 0, 0) triggerClientEvent(root, "OnSendMessage", root, "+"..money.." $", 0, 255, 0) triggerClientEvent(root, "OnSendMessage", root, "+"..ammo.." "..WE.."", 255, 255, 0) playSoundFrontEnd(root, 5) exports["guimessages"]:outputServer(root, "#65E3FCThe Manager#65E3FC Has Give All Players #15FF00[ #66AA0D".. money .." #15FF00$ ] + [ #66AA0D".. WE .." #15FF00 Ammo:("..ammo..")] + #15FF00[ #880000".. xp .." #FF0000xp #15FF00]", 255,105,180) outputChatBox ( "#65E3FCThe Manager#65E3FC Has Give All Players #15FF00[ #66AA0D".. money .." #15FF00$ ] + [ #66AA0D".. WE .." #15FF00 Ammo:("..ammo..")] + #15FF00[ #880000".. xp .." #FF0000xp #15FF00]", root, 255,105,180, true ) AllMSend = AllMSend + money AllXSend = AllXSend + xp AllWSend = AllWSend + ammo AllSend = AllSend + 1 setTimer(function() outputChatBox ( "#FFFF00[ #00FF00".. AllMSend .." $ #FFFF00] + [ #FFFFFF"..AllWSend.." ".. WE .."#FFFF00 ] + [ #FF0000".. AllXSend .." xp #FFFF00] :مجموع ما تم توزيعه [ #FF00FF".. AllSend .." #FFFF00] :التوزيع رقم ", root, 255,105,180, true ) end, 500,1) end, time*1000*10,times) end, after*1000*10,1) else outputChatBox ( "يوجد توزيع سابق قم باعادة تشغيل المود (منعاً لاي تعارضات)ـ", thePlayer, 255,100,100, true ) end end end ) دي بق يقول : ERROR: name : attempt to perform arithmetic on global 'after' (a nil value) Link to comment
H25 Posted August 25, 2016 Share Posted August 25, 2016 تأكد من قيمة المتغير after لازم تكون رقم حسب ما انت مستخدمه Link to comment
ivor Posted August 25, 2016 Author Share Posted August 25, 2016 تأكد من قيمة المتغير afterلازم تكون رقم حسب ما انت مستخدمه حاليآ انا جوال , كود حق صديقي وهوا يبي الحل مب انا Link to comment
H25 Posted August 25, 2016 Share Posted August 25, 2016 addCommandHandler ( "GAMXW", function (thePlayer,_,money, xp, we, ammo, time, times, after) after = tonumber(after) or 1 local name = getPlayerName(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) local WE = getWeaponNameFromID(we) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then if not isTimer(GAMXWTime) and not isTimer(GAMXWAfterTime) then GAMXWAfterTime = setTimer(function() exports["guimessages"]:outputServer(root, "I دقائق I[".. time .."]I سوف يبدأ التوزيع بعد I باعطاء امر التوزيع ["..name.."]I قام المدير I", 0,255,255) outputChatBox ( "I دقائق I[".. time .."]I سوف يبدأ التوزيع بعد I باعطاء امر التوزيع ["..name.."]I قام المدير I", root, 0,255,255, true ) AllMSend = 0 AllXSend = 0 AllWSend = 0 AllSend = 0 exports["guimessages"]:outputServer(root, "I دقائق I[".. time .."]I بين كل توزيع وآخر I مرات I[".. times .."]I سوف يتم التوزيع I", 255,0,255) outputChatBox ( "I دقائق I[".. time .."]I بين كل توزيع وآخر I مرات I[".. times .."]I سوف يتم التوزيع I", root, 255,0,255, true ) GAMXWTime = setTimer(function() for i, player in ipairs(getElementsByType("player")) do if ( isElement(player) ) then setElementData(player, "Money", (getElementData(player, "Money") or 0) + money) setElementData(player, "xp", (getElementData(player, "xp") or 0) + xp) giveWeapon(player, we, ammo) end end triggerClientEvent(root, "OnSendMessage", root, "+"..xp.." Xp", 255, 0, 0) triggerClientEvent(root, "OnSendMessage", root, "+"..money.." $", 0, 255, 0) triggerClientEvent(root, "OnSendMessage", root, "+"..ammo.." "..WE.."", 255, 255, 0) playSoundFrontEnd(root, 5) exports["guimessages"]:outputServer(root, "#65E3FCThe Manager#65E3FC Has Give All Players #15FF00[ #66AA0D".. money .." #15FF00$ ] + [ #66AA0D".. WE .." #15FF00 Ammo:("..ammo..")] + #15FF00[ #880000".. xp .." #FF0000xp #15FF00]", 255,105,180) outputChatBox ( "#65E3FCThe Manager#65E3FC Has Give All Players #15FF00[ #66AA0D".. money .." #15FF00$ ] + [ #66AA0D".. WE .." #15FF00 Ammo:("..ammo..")] + #15FF00[ #880000".. xp .." #FF0000xp #15FF00]", root, 255,105,180, true ) AllMSend = AllMSend + money AllXSend = AllXSend + xp AllWSend = AllWSend + ammo AllSend = AllSend + 1 setTimer(function() outputChatBox ( "#FFFF00[ #00FF00".. AllMSend .." $ #FFFF00] + [ #FFFFFF"..AllWSend.." ".. WE .."#FFFF00 ] + [ #FF0000".. AllXSend .." xp #FFFF00] :مجموع ما تم توزيعه [ #FF00FF".. AllSend .." #FFFF00] :التوزيع رقم ", root, 255,105,180, true ) end, 500,1) end, time*1000*10,times) end, after*1000*10,1) else outputChatBox ( "يوجد توزيع سابق قم باعادة تشغيل المود (منعاً لاي تعارضات)ـ", thePlayer, 255,100,100, true ) end end end ) Link to comment
ivor Posted August 26, 2016 Author Share Posted August 26, 2016 مشكلة دي بق يقولها ERROR: name : attempt to concatenate upvalue ' time' (a nil value) Link to comment
فاّرس Posted August 26, 2016 Share Posted August 26, 2016 .عشان تحول السترنق الى رقم ف التايمر tonumber عندك شوية اخطاء ولازم تستخدم Link to comment
SycroX Posted August 26, 2016 Share Posted August 26, 2016 مشكلة دي بق يقولها ERROR: name : attempt to concatenate upvalue ' time' (a nil value) ايه واضح انك جوال و ان صديقك الي يباه .. ترا الكذب ما يفيد + يبين اكتر انك طفل 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