Jump to content

×[مساعده]× ارور iparis


iiv03

Recommended Posts

?السلام عليكم ,معاي مشكله ب لوب ارور الي في صوره

h3bs9re667ym.png

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 by liwahadri
Link to comment

شكرا علي الرد @N3xT

انت تقول قاعد تسوي لوب علي nil

كيف يعني ؟ انا حاط جدول في مكان iparis :/

 

6 hours ago, N3xT said:

وليس جدولnil قاعد تسوي لوب على

 

	for i,data in ipairs(playerPodium) do
local playerPodium = {}

 

Edited by liwahadri
Link to comment
1 hour ago, liwahadri said:

شكرا علي الرد @N3xT

انت تقول قاعد تسوي لوب علي nil

كيف يعني ؟ انا حاط جدول في مكان iparis :/

 

 


	for i,data in ipairs(playerPodium) do

local playerPodium = {}

 

playerPodium = info

info تأكد من قيمة

Link to comment
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 by liwahadri
Link to comment
Just now, Abdul KariM said:

وش تبي تسوي بالضبط

انا سويت ذا مود عشان يضهر اسامي الاعبين الاخر شي فازو في ريس وسويت له اد افينت عشان اربطه ب تريقر في سيرفر

شغلت المود ضهر لي

outputChatBox("IT'S CONNECTED")
outputChatBox("DONE")

يعني شغال بس فيه مشكله ب فاكشن يجني كل شوي ارور الي ب صوره

Link to comment
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 by liwahadri
Link to comment
10 hours ago, HassoN said:

Info في جهة كلنت حاط شي اسمه

لكن ف جهة سيرفر مو راسله مع التريقر 

شوف ذا


triggerClientEvent(player,"podiumStart",player)

المفروض تضيف الي بترسله هنا

تسلممء حسن صرآحه المشكله اتحلت عشان ذا الخطأ بس

  • Like 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...