iiv03 Posted August 11, 2019 Share Posted August 11, 2019 (edited) السلام عليكم ,معاي مشكله ب لوب ارور الي في صوره local tick = getTickCount() local playerPodium = {} function updateMapInfo(info) playerPodium = info tick = getTickCount() for i,data in ipairs(playerPodium) do if data.user then local avatar = getAvatarByUser(data.user) if avatar then playerPodium[i].img = avatar else playerPodium[i].img = "avatars/default.png" end else playerPodium[i].img = "avatars/default.png" end end removeEventHandler("onClientRender",root,podiumRender) addEventHandler("onClientRender",root,podiumRender) end addEvent("podiumStart",true) addEventHandler("podiumStart",root,updateMapInfo) هل فيه خطأ ب loop Edited August 11, 2019 by liwahadri Link to comment
N3xT Posted August 11, 2019 Share Posted August 11, 2019 وليس جدول nil قاعد تسوي لوب على Link to comment
iiv03 Posted August 11, 2019 Author Share Posted August 11, 2019 (edited) شكرا علي الرد @N3xT انت تقول قاعد تسوي لوب علي nil كيف يعني ؟ انا حاط جدول في مكان iparis 6 hours ago, N3xT said: وليس جدولnil قاعد تسوي لوب على for i,data in ipairs(playerPodium) do local playerPodium = {} Edited August 11, 2019 by liwahadri Link to comment
#\_oskar_/# Posted August 11, 2019 Share Posted August 11, 2019 مدري كيف حاطت اضافة الرندر وحذفه فوق بعضهم + وضح اللي تبي تسويه Link to comment
N3xT Posted August 12, 2019 Share Posted August 12, 2019 1 hour ago, liwahadri said: شكرا علي الرد @N3xT انت تقول قاعد تسوي لوب علي nil كيف يعني ؟ انا حاط جدول في مكان iparis for i,data in ipairs(playerPodium) do local playerPodium = {} playerPodium = info info تأكد من قيمة Link to comment
iiv03 Posted August 12, 2019 Author Share Posted August 12, 2019 (edited) 17 minutes ago, N3xT said: playerPodium = info info تأكد من قيمة متأكد ب ميه الكود local tick = getTickCount() local playerPodium = {} function updateMapInfo(info) playerPodium = info tick = getTickCount() for i,data in ipairs(playerPodium) do if data.user then local avatar = getAvatarByUser(data.user) if avatar then playerPodium[i].img = avatar else playerPodium[i].img = "avatars/default.png" end else playerPodium[i].img = "avatars/default.png" end end removeEventHandler("onClientRender",root,podiumRender) addEventHandler("onClientRender",root,podiumRender) end addEvent("podiumStart",true) addEventHandler("podiumStart",root,updateMapInfo) function updateMapInfo() outputChatBox("IT'S CONNECTED") outputChatBox("DONE") local progress = math.min((getTickCount()-tick)/2500,1) if #playerPodium ~= 0 then for i=1,#playerPodium do local img = "avatars/default.png" if 1 == playerPodium[i].pos then dxDrawImage(sX*0.5-sY*0.075,sY*0.5-sY*0.075,sY*0.15,sY*0.15,":v_avatars/img/default-avatar.png",0,0,0,tocolor(255,255,255,255*progress)) dxDrawText(playerPodium[i].name.."\n#ffffffFIRST",sX*0.5-sY*0.075,sY*0.5+sY*0.08,sX*0.5+sY*0.075,sY,tocolor(255,255,255,255*progress),1,"defaul-bold","center","top",true,false,false,true) end if 2 == playerPodium[i].pos then dxDrawImage(sX*0.5-sY*0.065-sY*0.3,sY*0.5-sY*0.065,sY*0.13,sY*0.13,":v_avatars/img/default-avatar.png",0,0,0,tocolor(255,255,255,255*progress)) dxDrawText(playerPodium[i].name.."\n#ffffffSECOND",sX*0.5-sY*0.065-sY*0.3,sY*0.5+sY*0.07,sX*0.5+sY*0.065-sY*0.3,sY,tocolor(255,255,255,255*progress),1,"defaul-bold","center","top",true,false,false,true) end if 3 == playerPodium[i].pos then dxDrawImage(sX*0.5-sY*0.065+sY*0.3,sY*0.5-sY*0.065,sY*0.13,sY*0.13,":v_avatars/img/default-avatar.png",0,0,0,tocolor(255,255,255,255*progress)) dxDrawText(playerPodium[i].name.."\n#ffffffTHIRD",sX*0.5-sY*0.065+sY*0.3,sY*0.5+sY*0.07,sX*0.5+sY*0.065+sY*0.3,sY,tocolor(255,255,255,255*progress),1,"defaul-bold","center","top",true,false,false,true) end end end end addEvent("podiums",true) addEventHandler("podiums",root,updateMapInfo) addEvent("podiumStop",true) addEventHandler("podiumStop",root, function() removeEventHandler("onClientRender",root,podiumRender) end ) Edited August 12, 2019 by liwahadri Link to comment
iiv03 Posted August 12, 2019 Author Share Posted August 12, 2019 Just now, Abdul KariM said: وش تبي تسوي بالضبط انا سويت ذا مود عشان يضهر اسامي الاعبين الاخر شي فازو في ريس وسويت له اد افينت عشان اربطه ب تريقر في سيرفر شغلت المود ضهر لي outputChatBox("IT'S CONNECTED") outputChatBox("DONE") يعني شغال بس فيه مشكله ب فاكشن يجني كل شوي ارور الي ب صوره Link to comment
Abdul KariM Posted August 12, 2019 Share Posted August 12, 2019 ياخوي كودك حوسه مسوي وظيفتين بنفس الاسم خلي شغلك سيرفر سايد وبعدين ترايقر للكلينت Link to comment
iiv03 Posted August 12, 2019 Author Share Posted August 12, 2019 2 minutes ago, Abdul KariM said: ياخوي كودك حوسه مسوي وظيفتين بنفس الاسم خلي شغلك سيرفر سايد وبعدين ترايقر للكلينت طيب وش سالفته الكود ؟؟ Link to comment
iiv03 Posted August 12, 2019 Author Share Posted August 12, 2019 (edited) 5 hours ago, Hakan said: اطرح لنا ملف السيرفر local function getPositionSlang(rank) return rank..((rank < 10 or rank > 20) and ({ [1] = "st", [2] = "nd", [3] = "rd" })[rank % 10] or "th") end function onPlayerFinish(player, place) if(place ~= 1) then setElementData(player, "winStreak", 0, false) end if arena.finishedPlayers[player] ~= nil then return true end outputChatBox("#66cc99* #ffffffYou finished: #66cc99"..getPositionSlang(place), player, 255, 255, 255, true) triggerClientEvent(player,"podiumStart",player) arena.finishedPlayers[player] = true if not arena.statsEnabled then return end local playerStreak = getElementData(player, "winStreak") local money = math.ceil(arena.statsEnabled*((arena.statsEnabled-place)/2)) * (playerStreak > 0 and playerStreak or 1) local points = math.ceil(arena.statsEnabled*((arena.statsEnabled-place)/17.5)) * (playerStreak > 0 and playerStreak or 1) outputChatBox("#66cc99* #ffffffYou received #66cc99"..points.." #ffffffpoint"..(points == 1 and "" or "s").." and #66cc99$"..money, player, 255, 255, 255, true) end السرفر مافيه ولا خطا بس المشكله طالع من الكلينت وقالي السطر في لوب Edited August 12, 2019 by liwahadri Link to comment
HassoN Posted August 12, 2019 Share Posted August 12, 2019 Info في جهة كلنت حاط شي اسمه لكن ف جهة سيرفر مو راسله مع التريقر شوف ذا triggerClientEvent(player,"podiumStart",player) المفروض تضيف الي بترسله هنا 1 Link to comment
iiv03 Posted August 13, 2019 Author Share Posted August 13, 2019 10 hours ago, HassoN said: Info في جهة كلنت حاط شي اسمه لكن ف جهة سيرفر مو راسله مع التريقر شوف ذا triggerClientEvent(player,"podiumStart",player) المفروض تضيف الي بترسله هنا تسلممء حسن صرآحه المشكله اتحلت عشان ذا الخطأ بس 1 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