#AL-J7EEEM Posted March 23, 2017 Share Posted March 23, 2017 السلام عليكم ورحمه الله وبركاته الحين اانا ابي مثلا اسوي كذا لم اضغط علي زر يجي في الشات مثلا كل الي معاهم الداتا هذي واسم حساباتهم مثلا Account (j7eem) Money (500) Account (master) Money(1000) فاهمين قصدي؟ اول شي اعرفه بحتاج outputChatBox وش احتاج تاني؟ Link to comment
AHMED MOSTAFA Posted March 23, 2017 Share Posted March 23, 2017 Just now, #AL-J7EEEM said: السلام عليكم ورحمه الله وبركاته الحين اانا ابي مثلا اسوي كذا لم اضغط علي زر يجي في الشات مثلا كل الي معاهم الداتا هذي واسم حساباتهم مثلا Account (j7eem) Money (500) Account (master) Money(1000) فاهمين قصدي؟ اول شي اعرفه بحتاج outputChatBox وش احتاج تاني؟ سوي لووب function yourFunction ( ) for _, v in pairs( getElementsByType( "player" ) ) do local money = getPlayerMoney( v ) local account = getPlayerAccount ( v ) local accname = getAccountName ( account ) end end Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 function yourFunction ( ) for _, v in pairs( getElementsByType( "player" ) ) do local diamond = getElementData("Diamond",0)( v ) local account = getPlayerAccount ( v ) local accname = getAccountName ( account ) end end ) تصحيح Link to comment
Master_MTA Posted March 23, 2017 Share Posted March 23, 2017 22 minutes ago, #AL-J7EEEM said: function yourFunction ( ) for _, v in pairs( getElementsByType( "player" ) ) do local diamond = getElementData("Diamond",0)( v ) local account = getPlayerAccount ( v ) local accname = getAccountName ( account ) end end ) تصحيح مب فاهم عليك فهمني وش تبي تسوي بالظبط Link to comment
#STZ Posted March 23, 2017 Share Posted March 23, 2017 يبي لما يضغط زر يجي outputChatBox سطر في الشات اسم شخص وعدد المنت داتا حقته Link to comment
Master_MTA Posted March 23, 2017 Share Posted March 23, 2017 4 minutes ago, MR.NaiF-MTA said: يبي لما يضغط زر يجي outputChatBox سطر في الشات اسم شخص وعدد المنت داتا حقته طيب الشخص كيف يجيبه من وشو من جريد لست ولا وشو؟ Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 6 minutes ago, Master_MTA said: طيب الشخص كيف يجيبه من وشو من جريد لست ولا وشو؟ ولا قريد ليست ولا شي هو موجود زر لم اضغط عليه يجيب في كل سطر اسم حساب الشخص وجانبه عدد المنت معينه Link to comment
Master_MTA Posted March 23, 2017 Share Posted March 23, 2017 (edited) 27 minutes ago, #AL-J7EEEM said: ولا قريد ليست ولا شي هو موجود زر لم اضغط عليه يجيب في كل سطر اسم حساب الشخص وجانبه عدد المنت معينه addEventHandler('onClientGUIClick',root,function() if source==btn then ----------btn بدله باسم الزر local allplayers=getElementesByType('player') for k,v in ipairs(allplayers)do triggerServerEvent('showchatdata',localPlayer,v) end end end) ------server addEvent('showchatdata',true) addEvent('showchatdata',root,function(player) if isElement(player) then local data=getElementData(player,'dataname') local acc=getPlayerAccount(player) if not isGuestAccount(acc) then outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true) else outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true) end end end) في العاده ما اعطي اكواد جاهزه لكني شفت لك محاوله اخرى في موضوع اخر بالتوفيق جرب ورد خبر Edited March 23, 2017 by Master_MTA Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 15 minutes ago, Master_MTA said: addEventHandler('onClientGUIClick',root,function() if source==btn then ----------btn بدله باسم الزر local allplayers=getElementesByType('player') for k,v in ipairs(allplayers)do triggerServerEvent('showchatdata',localPlayer,v) end end end) ------server addEvent('showchatdata',true) addEvent('showchatdata',root,function(player) if isElement(player) then local data=getElementData(player,'dataname') local acc=getPlayerAccount(player) if not isGuestAccount(acc) then outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true) else outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true) end end end) في العاده ما اعطي اكواد جاهزه لكني شفت لك محاوله اخرى في موضوع اخر بالتوفيق جرب ورد خبر الدي بق يقلي خطا ف السطر 204 الي هو local allplayers = getElementesByType('player') Link to comment
Master_MTA Posted March 23, 2017 Share Posted March 23, 2017 Just now, #AL-J7EEEM said: الدي بق يقلي خطا ف السطر 204 الي هو local allplayers = getElementesByType('player') سوري في خطا املائي ذذ عدله لهاذا لاني كنت مزود e ذذ local allplayers = getElementsByType('player') Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 (edited) 6 minutes ago, Master_MTA said: سوري في خطا املائي ذذ عدله لهاذا لاني كنت مزود e ذذ local allplayers = getElementsByType('player') WARNING:SCRIPT\SERVER.lua:127:Bad argument@'addEvent'[Expected bool at argument 2, got root الدي بق = السطر رقم 127 addEvent('showchatdata',root,function(player) Edited March 23, 2017 by #AL-J7EEEM Link to comment
Master_MTA Posted March 23, 2017 Share Posted March 23, 2017 Just now, #AL-J7EEEM said: WARNING:SCRIPT\SERVER.lua:127:Bad argument@'addEvent'[Expected bool at argument 2, got root الدي بق = السطر رقم 127 معليش خطا املائي ثاني كنت ناسي handler الان بدل ذا بكود السيرفر addEvent('showchatdata',true) addEventHandler('showchatdata',root,function(player) if isElement(player) then local data=getElementData(player,'dataname') local acc=getPlayerAccount(player) if not isGuestAccount(acc) then outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true) else outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true) end end end) Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 1 minute ago, Master_MTA said: معليش خطا املائي ثاني كنت ناسي handler الان بدل ذا بكود السيرفر addEvent('showchatdata',true) addEventHandler('showchatdata',root,function(player) if isElement(player) then local data=getElementData(player,'dataname') local acc=getPlayerAccount(player) if not isGuestAccount(acc) then outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true) else outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true) end end end) الدي بق يقلي في خطأ في السطر رقم 132 = outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true) Link to comment
Master_MTA Posted March 23, 2017 Share Posted March 23, 2017 1 minute ago, #AL-J7EEEM said: الدي بق يقلي في خطأ في السطر رقم 132 = outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true) وشهو الخطا وش يطلع الدي بق Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 ERROR:SCRIPT\SERVER.lua:132: attempt top concatenate aboolean value 3 minutes ago, Master_MTA said: وشهو الخطا وش يطلع الدي بق ERROR:SCRIPT\SERVER.lua:132: attempt top concatenate aboolean value Link to comment
Master_MTA Posted March 23, 2017 Share Posted March 23, 2017 (edited) addEventHandler('onClientGUIClick',root,function() if source==btn then ----------btn بدله باسم الزر triggerServerEvent('showchatdata',localPlayer) end end) ------server addEvent('showchatdata',true) addEvent('showchatdata',root,function() local allplayers=getElementesByType('player') for k,player in ipairs(allplayers)do local data=getElementData(player,'dataname') local acc=getPlayerAccount(player) if not isGuestAccount(acc) then outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true) else outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true) end end end) جرب 2 minutes ago, #AL-J7EEEM said: ERROR:SCRIPT\SERVER.lua:132: attempt top concatenate aboolean value ERROR:SCRIPT\SERVER.lua:132: attempt top concatenate aboolean value Edited March 23, 2017 by Master_MTA Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 ERROR:SCRIPT\SERVER.lua:128: attempt to call global 'getElementesByType' (a nil valua)الدي بق local allplayers=getElementesByType('player') سطر رقم 128^ Link to comment
Master_MTA Posted March 23, 2017 Share Posted March 23, 2017 3 minutes ago, #AL-J7EEEM said: ERROR:SCRIPT\SERVER.lua:128: attempt to call global 'getElementesByType' (a nil valua)الدي بق local allplayers=getElementesByType('player') سطر رقم 128^ قلتلك عدلها يبن الناس مزود e انا وش فيك خذ ذا الصحيح local allplayers=getElementsByType('player') Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 Quote outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true) يقلي في خطا في ذا السطر دي بق ERROR:SCRIPT\SERVER.lua:133: attempt to concatenaterr a boolean value Link to comment
ivor Posted March 23, 2017 Share Posted March 23, 2017 6 minutes ago, #AL-J7EEEM said: يقلي في خطا في ذا السطر دي بق ERROR:SCRIPT\SERVER.lua:133: attempt to concatenaterr a boolean value local data=getElementData(player,'dataname') بدلها الي local data=getElementData(player,'Diamond') وخلصت السالفة Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 4 minutes ago, #!Error.xD said: local data=getElementData(player,'dataname') بدلها الي local data=getElementData(player,'Diamond') وخلصت السالفة مسويها كذا انا Link to comment
ivor Posted March 23, 2017 Share Posted March 23, 2017 outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..'.',255,0,0,true) جرب Link to comment
Adham Posted March 23, 2017 Share Posted March 23, 2017 (edited) اولأ : getElementesByType X getElementsByType ثانيأ انك مب معرف plr ب ملف سرفر جرب addEvent( "showchatdata",true ) addEventHandler( "showchatdata",root, function() for i, player in ipairs ( getElementsByType ( "player" ) ) do local data = getElementData( player,'dataname' ) local acc = getPlayerAccount( player ) if not isGuestAccount( acc ) then outputChatBox('the player name ['..getAccountName(player)..'] and he is data '..data..' .',root,255,255,255,true) else outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true) end end end) Edited March 23, 2017 by Deativated Link to comment
#AL-J7EEEM Posted March 23, 2017 Author Share Posted March 23, 2017 5 minutes ago, Deativated said: اولأ : getElementsType X getElementType ثانيأ انك مب معرف plr ب ملف سرفر جرب addEvent( "showchatdata",true ) addEventHandler( "showchatdata",root, function() for k,player in ipairs( "player" )do local data = getElementData( player,'dataname' ) local acc =getPlayerAccount( player ) if not isGuestAccount( acc ) then outputChatBox('the player name ['..getAccountName(player)..'] and he is data '..data..' .',root,255,255,255,true) else outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true) end end end) خطا السطر 133 Link to comment
Adham Posted March 23, 2017 Share Posted March 23, 2017 Just now, #AL-J7EEEM said: خطا السطر 133 اطرح سطر 133 .. ونا عدلت الكود خده مره تانيه 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