Jump to content

تصحيح كود .


Recommended Posts

السلام عليكم

الحين انا مسوي كود

انه يجيب بل قريد ليست

اسماء الحسابات الي في جروب الرتبه المخصصه 

ممكن تصحيح؟

الدي بق مايجيب شي

function putPlayers()
	guiGridListClear(gridlist2)
	for i,account in ipairs(getElementsByType("account")) do 
		local row = guiGridListAddRow(gridlist2)
		guiGridListSetItemText(gridlist2,row,1,getPlayerAccount(account),false,false)
	    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
	end
end



addEventHandler("onClientGUIChanged",root,
	function ()
		if ( source == grud12 ) then
			local text = string.upper(guiGetText(grud12))
			if ( text == "" ) then
				putPlayers()    
			else
				guiGridListClear(gridlist2)
				for i,v in ipairs(getElementsByType("player")) do
					local name = string.upper(getPlayerName(v))
					if string.find(name,text) then
					playSoundFrontEnd(3)
						local row = guiGridListAddRow(gridlist2)
						guiGridListSetItemText(gridlist2,row,1,getPlayerAccount,false,false)
						guiGridListSetItemText(gridlist2,row,2,("user."..accName, aclGetGroup ( "Console" ) ) ,false,false)
						

					end
				end
			end
		end
	end
)

 

Link to comment
function putPlayers()
	guiGridListClear(gridlist2)
	for i,account in ipairs(getAccounts()) do 
accName = getAccountName(account)
  if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
		local row = guiGridListAddRow(gridlist2)
		guiGridListSetItemText(gridlist2,row,1,accName,false,false)
	  
	end
end

 

Edited by 3laa33
Link to comment
Just now, 3laa33 said:

function putPlayers()
	guiGridListClear(gridlist2)
	for i,account in ipairs(getAccounts()) do 
accName = getAccountName(account)
  if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
		local row = guiGridListAddRow(gridlist2)
		guiGridListSetItemText(gridlist2,row,1,accName,false,false)
	  
	end
end

 




really


 

	guiGridListClear(gridlist2)
		local row = guiGridListAddRow(gridlist2)
		guiGridListSetItemText(gridlist2,row,1,accName,false,false)




وش تسوي بالسيرفر ؟

وحتى اذا كان الملف كلينت وش ذا


 

accName = getAccountName(account)
  if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 

 

 

Link to comment
25 minutes ago, 3laa33 said:

function putPlayers()
	guiGridListClear(gridlist2)
	for i,account in ipairs(getAccounts()) do 
accName = getAccountName(account)
  if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
		local row = guiGridListAddRow(gridlist2)
		guiGridListSetItemText(gridlist2,row,1,accName,false,false)
	  
	end
end

 

ناقصك ايند

ومثل م قال كيلر . خبصة وظائف سيرفر مع كلينت

Link to comment
Just now, -#GoDa said:

o.O طيب حد يساعد .

@3laa33

@#BrosS

@Master_MTA

@Killer Project

-- server

function كمل ()
	for id, كمل in ipairs(getElementsByType("player")) do
		if ( getPlayerAccount ( كمل ) ) and not isGuestAccount ( ( getPlayerAccount ( player ) ) ) then
			if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "كمل" ) ) then
				setElementData ( player, "كمل", getAccountName ( getPlayerAccount ( كمل ) ) )
			كمل
				setElementData ( player, "accname", "noacc" )
			end
		else
			setElementData ( كمل, "accname", "noacc" )
		end
	كمل
end

test1 ()

-- client

accNameList = guiCreateGridList
column = guiGridListAddColumn( accNameList, "Player", 0.85 )

function test2 ()
	if ( column ) then
		for id, player in ipairs(getElementsByType("كمل")) do
			local row = guiGridListAddRow ( كمل )
			if not ( getElementData ( كمل, "accname" ) == "noacc" ) then
				guiGridListSetItemText ( كمل, row, column, getElementData ( كمل, "accname" ) or "noacc", false, false )
			end
		end
	end
end

كمل ()


جرب

Edited by Killer Project
كمل :D
Link to comment
3 minutes ago, Killer Project said:

-- server

function كمل ()
	for id, كمل in ipairs(getElementsByType("player")) do
		if ( getPlayerAccount ( كمل ) ) and not isGuestAccount ( ( getPlayerAccount ( player ) ) ) then
			if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "كمل" ) ) then
				setElementData ( player, "كمل", getAccountName ( getPlayerAccount ( كمل ) ) )
			كمل
				setElementData ( player, "accname", "nocc" )
			end
		else
			setElementData ( كمل, "accname", "nocc" )
		end
	كمل
end

test1 ()

-- client

accNameList = guiCreateGridList
column = guiGridListAddColumn( accNameList, "Player", 0.85 )

function test2 ()
	if ( column ) then
		for id, player in ipairs(getElementsByType("كمل")) do
			local row = guiGridListAddRow ( كمل )
			if not ( getElementData ( كمل, "accname" ) == "noacc" ) then
				guiGridListSetItemText ( كمل, row, column, getElementData ( كمل, "accname" ) or "noacc", false, false )
			end
		end
	end
end

كمل ()


جرب

سؤال صغير وش كمل ؟ ض

Link to comment
Just now, -#GoDa said:

سؤال صغير وش كمل ؟ ض


اول شي كان فيه خطأ في كلمة
nocc
كان ناقص حرف الالف

المهم اطلع لردي مرة ثانية عدلته

وثاني شي اكيد مارح اعطيك كود كامل وش رح تستفاد اذا اعتيتك كود كامل ؟

Link to comment
3 minutes ago, Killer Project said:


اول شي كان فيه خطأ في كلمة
nocc
كان ناقص حرف الالف

المهم اطلع لردي مرة ثانية عدلته

وثاني شي اكيد مارح اعطيك كود كامل وش رح تستفاد اذا اعتيتك كود كامل ؟

انا مو فاهم يعني اعتقد باقي شي لحق الاسل علموم بكمله واجربه

function nocc ()
	for id, player in ipairs(getElementsByType("player")) do
		if ( getPlayerAccount ( كمل ) ) and not isGuestAccount ( ( getPlayerAccount ( player ) ) ) then
			if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Console" ) ) then
				setElementData ( player, "Console", getAccountName ( getPlayerAccount ( Console ) ) )
			if
				setElementData ( player, "accname", "nocc" )
			end
		else
			setElementData ( Console, "accname", "nocc" )
		end
	end
end

test1 ()

-- client

accNameList = guiCreateGridList
column = guiGridListAddColumn( accNameList, "Player", 0.85 )

function test2 ()
	if ( column ) then
		for id, player in ipairs(getElementsByType("player")) do
			local row = guiGridListAddRow ( Console )
			if not ( getElementData ( Console, "accname" ) == "nocc" ) then
				guiGridListSetItemText ( Console, row, column, getElementData ( Console, "accname" ) or "noacc", false, false )
			end
		end
	end
end

test2 ()

تمام كذا ؟ ..

@Killer Project

+ فيه مشكله بل سطر

column = guiGridListAddColumn( accNameList, "Player", 0.85 )

بخصوص الارقمنت

@Killer Project

Link to comment
Just now, -#GoDa said:

انا مو فاهم يعني اعتقد باقي شي لحق الاسل علموم بكمله واجربه


function nocc ()
	for id, player in ipairs(getElementsByType("player")) do
		if ( getPlayerAccount ( كمل ) ) and not isGuestAccount ( ( getPlayerAccount ( player ) ) ) then
			if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Console" ) ) then
				setElementData ( player, "Console", getAccountName ( getPlayerAccount ( Console ) ) )
			if
				setElementData ( player, "accname", "nocc" )
			end
		else
			setElementData ( Console, "accname", "nocc" )
		end
	end
end

test1 ()

-- client

accNameList = guiCreateGridList
column = guiGridListAddColumn( accNameList, "Player", 0.85 )

function test2 ()
	if ( column ) then
		for id, player in ipairs(getElementsByType("player")) do
			local row = guiGridListAddRow ( Console )
			if not ( getElementData ( Console, "accname" ) == "nocc" ) then
				guiGridListSetItemText ( Console, row, column, getElementData ( Console, "accname" ) or "noacc", false, false )
			end
		end
	end
end

test2 ()

تمام كذا ؟ ..

@Killer Project

+ فيه مشكله بل سطر


column = guiGridListAddColumn( accNameList, "Player", 0.85 )

بخصوص الارقمنت

@Killer Project


مب قادر استعمل التاج بسبب ضعف الانترنت

-- server

function test1 ()
    for id, player in ipairs(getElementsByType("player")) do
        if ( getPlayerAccount ( player ) ) and not isGuestAccount ( ( getPlayerAccount ( player ) ) ) then
            if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Console" ) ) then
                setElementData ( player, "accname", getAccountName ( getPlayerAccount ( player ) ) )
            else
                setElementData ( player, "accname", "noacc" )
            end
        else
            setElementData ( player, "accname", "noacc" )
        end
    end
end

test1 ()

-- client

accNameList = guiCreateGridList
column = guiGridListAddColumn( accNameList, "Player", 0.85 )

function test2 ()
    if ( column ) then
        for id, player in ipairs(getElementsByType("player")) do
            local row = guiGridListAddRow ( accNameList )
            if not ( getElementData ( player, "accname" ) == "noacc" ) then
                guiGridListSetItemText ( accNameList, row, column, getElementData ( player, "accname" ) or "noacc", false, false )
            end
        end
    end
end

test2 ()

 

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...