Jump to content

طلب كود


Jw8.

Recommended Posts

كود خطأ 

11 minutes ago, Amr_Mohamed said:

تفضل هاد 


	local PlayerComboBox = guiCreateComboBox ( 100, 100, 200,400, "Player Names", false ) 
	for i, p in ipairs ( getElementsByType ( "player" ) ) do 
		guiComboBoxAddItem ( PlayerComboBox, getPlayerName ( p ) ) 
	end
	

 

 

Link to comment

جرب

local PlayerComboBox = guiCreateComboBox ( 100, 100, 200,400, "Player Names", false ) 
function ref ()
	guiComboBoxClear ( PlayerComboBox )   
	for i, p in ipairs ( getElementsByType ( "player" ) ) do 
		guiComboBoxAddItem ( PlayerComboBox, getPlayerName ( p ) ) 
	end
end
ref ()
addEventHandler("onClientPlayerJoin", getRootElement(), ref)
addEventHandler( "onClientPlayerQuit", getRootElement(), ref)

 

ويش الخبار

الكود يعمل و لا 

Link to comment
22 hours ago, Amr_Mohamed said:

جرب


local PlayerComboBox = guiCreateComboBox ( 100, 100, 200,400, "Player Names", false ) 
function ref ()
	guiComboBoxClear ( PlayerComboBox )   
	for i, p in ipairs ( getElementsByType ( "player" ) ) do 
		guiComboBoxAddItem ( PlayerComboBox, getPlayerName ( p ) ) 
	end
end
ref ()
addEventHandler("onClientPlayerJoin", getRootElement(), ref)
addEventHandler( "onClientPlayerQuit", getRootElement(), ref)

 

ويش الخبار

الكود يعمل و لا 

تعديل بسيط
 

function ref ()
	guiComboBoxClear ( PlayerComboBox  )   
	for i, p in ipairs ( getElementsByType ( "player" ) ) do 
		guiComboBoxAddItem ( PlayerComboBox , getPlayerName ( p ) ) 
	end
end
ref ()
addEventHandler("onClientPlayerJoin", getRootElement(), ref)
addEventHandler("onClientResourceStart", getRootElement(), ref)
addEventHandler( "onClientPlayerQuit", getRootElement(), ref)
addEventHandler("onClientPlayerChangeNick", getRootElement(), ref)

 

Edited by #Himoo
Link to comment
4 hours ago, #Himoo said:

تعديل بسيط
 


function ref ()
	guiComboBoxClear ( PlayerComboBox  )   
	for i, p in ipairs ( getElementsByType ( "player" ) ) do 
		guiComboBoxAddItem ( PlayerComboBox , getPlayerName ( p ) ) 
	end
end
ref ()
addEventHandler("onClientPlayerJoin", getRootElement(), ref)
addEventHandler("onClientResourceStart", getRootElement(), ref)
addEventHandler( "onClientPlayerQuit", getRootElement(), ref)
addEventHandler("onClientPlayerChangeNick", getRootElement(), ref)

 

function ref ()
	guiComboBoxClear ( PlayerComboBox  )   
	for i, p in ipairs ( getElementsByType ( "player" ) ) do 
		local Add = guiComboBoxAddItem ( PlayerComboBox ) 
    	guiComboBoxSetItemText ( PlayerComboBox, Add, getPlayerName ( p ) ) -- اعتقد لازم هاذي
	end
end
ref ()
addEventHandler("onClientPlayerJoin", getRootElement(), ref)
addEventHandler("onClientResourceStart", getRootElement(), ref)
addEventHandler( "onClientPlayerQuit", getRootElement(), ref)
addEventHandler("onClientPlayerChangeNick", getRootElement(), ref)

اعتقد صح | غير مجرب

Link to comment
On 9/6/2017 at 16:06, Source|> said:

function ref ()
	guiComboBoxClear ( PlayerComboBox  )   
	for i, p in ipairs ( getElementsByType ( "player" ) ) do 
		local Add = guiComboBoxAddItem ( PlayerComboBox ) 
    	guiComboBoxSetItemText ( PlayerComboBox, Add, getPlayerName ( p ) ) -- اعتقد لازم هاذي
	end
end
ref ()
addEventHandler("onClientPlayerJoin", getRootElement(), ref)
addEventHandler("onClientResourceStart", getRootElement(), ref)
addEventHandler( "onClientPlayerQuit", getRootElement(), ref)
addEventHandler("onClientPlayerChangeNick", getRootElement(), ref)

اعتقد صح | غير مجرب

الي فوق شغال :)
هذا تخبيص

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