Jump to content

طلب مساعدة [ Mods]


#Mr.Pop

Recommended Posts

السلام عليكم باك شباب

كيفك

انشاء الله بخير

الحمد الله على النعمة .... الهم

طلبي :

ممكن تساعدنوني في الكود لم اللعب يضغط على زر اسمو راح يروح للجريد

addEventHandler("onClientGUIClick",root,function(player)
if source == nominate then
name = getPlayerFromName(playez)
local GridList = GridOfVoters and GridVoteePlayer
local row = guiGridListAddRow(GridVoteePlayer) and guiGridListAddRow(GridOfVoters)
            guiGridListSetItemText(GridList, row, 1, name, true, false) 
 end
end
	)
Edited by #Mr.Pop
Link to comment
17 minutes ago, Ahmed Ly said:

addEventHandler("onClientGUIClick",root,function()
if source == nominate then
name = getPlayerName(localPlayer)
local row = guiGridListAddRow(GridList)  
guiGridListSetItemText(GridList, row, 1,""..name.."", true, false) 
 end
end
)

 

مشكور والله ضض والله جرب كل شيئ لكن ماكانت تضبط تسلم اخوي

Link to comment
4 minutes ago, -Le[3]bA. said:

للمعلومه: الكود حقك بيظهر للاعب الواحد فقط الضعط عليه.

يعني لزم اسوي تريجر سيرفر ثم من السيرفر للكلينت ؟

شو أسوي

Edited by #Mr.Pop
Link to comment

تفضل جرب :

-- Client Side --
addEventHandler ( "onClientGUIClick", resourceRoot,
	function ( )
		if source == button then
			triggerServerEvent ( "onAccept", localPlayer, getPlayerName (localPlayer) )
		end
	end
)

addEvent ( "GridList", true )
addEventHandler ( "GridList", root,
	function ( playerName )
		if playerName then
			local row = guiGridListAddRow ( gridList )
			guiGridListSetItemText( gridList, row, 1, playerName, false, false ) 
		end
	end
)

-- Server Side --
addEvent ( "onAccept", true )
addEventHandler ( "onAccept", root,
	function ( playerName )
		if playerName then
			triggerClientEvent ( root, "GridList", root, playerName )
		end
	end
)

 

  • Like 1
Link to comment

اوك مشكور مقصر 

كيف اسوي يختار لان نسيت كل الاكواد كنت معتزل و ايضا كنت اتعلم لغات اخرى تخربط

يختار من الجريد ليست

متضكر شيئ مثل تعمل حصر

if row<1 and row>0 then

Link to comment
--Client
addEventHandler("onClientGUIClick",root,function()
if source == nominate then
local name = string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "")
triggerServerEvent("event",localPlayer,name,"event2")
 end
end
)

addEvent("event2",true)
addEventHandler("event2",root,
function (name)
local row = guiGridListAddRow(GridList)  
guiGridListSetItemText(GridList, row, 1,""..name.."", true, false) 
end
)

--Server
addEvent("event",true)
addEventHandler("event",root,
function (name,text)
triggerClientEvent(root,text,root,name)
end
)

 

4 minutes ago, #Mr.Pop said:

اوك مشكور مقصر 

كيف اسوي يختار لان نسيت كل الاكواد كنت معتزل و ايضا كنت اتعلم لغات اخرى تخربط

يختار من الجريد ليست

متضكر شيئ مثل تعمل حصر

if row<1 and row>0 then

slect = guiGridListGetSelectedItem(girdlist)
if slect ~= -1 then 

 

  • Like 1
  • Thanks 1
Link to comment

مشكورينبس تذكرت طريقة الحصر والله مقصرتو راح احطها للاستفادة

if source == Votenow then 
	local row, col = guiGridListGetSelectedItem (GridVoteePlayer)
		if ( row and col and row ~= -1 and col ~= -1 ) then
		if row > -1 and row < 1 then
    
        	 end
   		 end
 	end

 

addEvent("GridList2",true)
addEventHandler("GridList2",root,
function(playerName)
			if playerName then
			local data = 0
local row = guiGridListAddRow(GridVoteePlayer) and  guiGridListAddRow(GridOfVoters)
guiGridListSetItemText(GridVoteePlayer, row, 2,data+1, false, false) 
guiGridListSetItemText(GridOfVoters, row, 2,data+1, false, false) 
-- destroyElement(Votenow)

	end
		end)

;وين الخطأ

Link to comment
On ١٢‏/١٢‏/٢٠١٧ at 23:54, #Mr.Pop said:

مشكورينبس تذكرت طريقة الحصر والله مقصرتو راح احطها للاستفادة


if source == Votenow then 
	local row, col = guiGridListGetSelectedItem (GridVoteePlayer)
		if ( row and col and row ~= -1 and col ~= -1 ) then
		if row > -1 and row < 1 then
    
        	 end
   		 end
 	end

 


addEvent("GridList2",true)
addEventHandler("GridList2",root,
function(playerName)
			if playerName then
			local data = 0
local row = guiGridListAddRow(GridVoteePlayer) and  guiGridListAddRow(GridOfVoters)
guiGridListSetItemText(GridVoteePlayer, row, 2,data+1, false, false) 
guiGridListSetItemText(GridOfVoters, row, 2,data+1, false, false) 
-- destroyElement(Votenow)

	end
		end)

;وين الخطأ

addEventHandler("onClientGUIClick",root, 
if source == Votenow then 
	local row, col = guiGridListGetSelectedItem (GridVoteePlayer)
		if ( row and col and row ~= -1 and col ~= -1 ) then
		if row > -1 and row < 1 then
    
        	 end
   		 end
 	end
end
)
--- اعتقد لاني مافهمت الخطا

 

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