Adham Posted July 1, 2016 Share Posted July 1, 2016 آلسسلآم عليككم .. بدون مقدمات ... عندي اسوي اذا حدد اسم من القريد لست .. يجي اسمه في لابل + السريال .. لاكن م يجي شي عـ آلعموم هذآ آلكود .. addEventHandler("onClientGUIClick", resourceRoot, function() if (source == GUIEditor.gridlist[1]) then local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local text = guiGridListGetItemData(GUIEditor.gridlist[1],sel,1) local player = getPlayerFromName(text) if (player) then triggerServerEvent("getSerial", localPlayer, player) end end end) addEvent("setSerial",true) addEventHandler("setSerial", root, function(Name, Serial) guiSetText(GUIEditor.label[2],"Name: "..Name ) guiSetText(GUIEditor.label[3]",Serial: "..Serial) end) addEvent("getSerial",true) addEventHandler("getSerial", root, function(player) local playerName = getPlayerName(player) local playerSerial = getPlayerSerial(player) triggerClientEvent(source,"setSerial", source, playerName, playerSerial) end) دي بق : WARNING: bl/c,lua:133: Bad argument @ 'getPlayerFromName' [Expected string at argument 1, got nil Link to comment
N3xT Posted July 1, 2016 Share Posted July 1, 2016 حط قيت بلاير فروم نيم بجانب سيرفر ، ارسل بالتريقر اختيارك بالقريد واستقبله بسيرفر Link to comment
#|_oskar_|# Posted July 1, 2016 Share Posted July 1, 2016 نفس طلبك بالموضوع السابق بس غير حساب اللاعب الى سيرياله واسمه Link to comment
Adham Posted July 1, 2016 Author Share Posted July 1, 2016 تمام , سويته انا بس لما بحدد اسم بعدين اشيلو يجي اسم وسريالي انا ابي N/A م ظبت addEventHandler("onClientGUIClick", resourceRoot, function() if (source == GUIEditor.gridlist[1]) then local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if ( sel ~= 1 ) then local text = guiGridListGetItemText(GUIEditor.gridlist[1],sel,1) if ( text and text ~= "" ) then local player = getPlayerFromName(text) if (player) then triggerServerEvent("getSerial", localPlayer, player) else guiSetText(GUIEditor.label[2],"Name : N/A") guiSetText(GUIEditor.label[3],"Serial : N/A") end end end end end ) Link to comment
#|_oskar_|# Posted July 1, 2016 Share Posted July 1, 2016 مدرى ليه مطول كودك + حاوول سويها انت لاني اشوفك تساعد ناس ب اكواد اصععب من طلبك Link to comment
N3xT Posted July 1, 2016 Share Posted July 1, 2016 addEventHandler("onClientGUIClick", resourceRoot, function() if (source = GUIEditor.gridlist[1]) then local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local text = guiGridListGetItemText(GUIEditor.gridlist[1],sel,1) if ( text and text ~= "" ) then local player = getPlayerFromName(text) if (player) then triggerServerEvent("getSerial", localPlayer, player) end else guiSetText(GUIEditor.label[2],"Name : N/A") guiSetText(GUIEditor.label[3],"Serial : N/A") end end end ) Link to comment
#DRAGON!FIRE Posted July 1, 2016 Share Posted July 1, 2016 addEventHandler("onClientGUIClick", resourceRoot, function() if (source = GUIEditor.gridlist[1]) then local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local text = guiGridListGetItemText(GUIEditor.gridlist[1],sel,1) if ( text and text ~= "" ) then local player = getPlayerFromName(text) if (player) then triggerServerEvent("getSerial", localPlayer, player) end else guiSetText(GUIEditor.label[2],"Name : N/A") guiSetText(GUIEditor.label[3],"Serial : N/A") end end end ) تحققك كذا ما ينفع يا عزيزي لان ما سويت تحقق اذا مختار شي او لأ اصلأ ! .. اعتقد ان صاحب الموضوع انحلت المشكلة معاهـ خلاص Link to comment
' A F . Posted July 2, 2016 Share Posted July 2, 2016 addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == GUIEditor.gridlist[1] ) then local Select_ = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) if ( Select_ ~= -1 ) then if ( getPlayerFromName ( guiGridListGetItemText(GUIEditor.gridlist[1],Select_,1) ) ) then triggerServerEvent("getSerial", localPlayer,getPlayerFromName(guiGridListGetItemText(GUIEditor.gridlist[1],Select_,1))) end else guiSetText(GUIEditor.label[2],"Name : N/A") guiSetText(GUIEditor.label[3],"Serial : N/A") end end end ) 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