Jump to content

فنكشات


Recommended Posts

Posted

السلام عليكم ورحمه الله وبركاته

الحين اانا ابي مثلا اسوي كذا لم اضغط علي زر

يجي في الشات مثلا كل الي معاهم الداتا هذي واسم حساباتهم مثلا

Account (j7eem) Money (500)

Account (master) Money(1000)

فاهمين قصدي؟

اول شي اعرفه بحتاج

outputChatBox

وش احتاج تاني؟

Posted
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

 

Posted
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
)

تصحيح

Posted
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
)

تصحيح

مب فاهم عليك فهمني وش تبي تسوي بالظبط

Posted

يبي لما يضغط زر 

يجي 

outputChatBox 

سطر في الشات اسم شخص وعدد المنت داتا حقته

Posted
4 minutes ago, MR.NaiF-MTA said:

يبي لما يضغط زر 

يجي 

outputChatBox 

سطر في الشات اسم شخص وعدد المنت داتا حقته

طيب الشخص كيف يجيبه من وشو

من جريد لست ولا وشو؟

Posted
6 minutes ago, Master_MTA said:

طيب الشخص كيف يجيبه من وشو

من جريد لست ولا وشو؟

ولا قريد ليست ولا شي هو موجود زر لم اضغط عليه يجيب 

في كل سطر اسم حساب الشخص

وجانبه عدد المنت معينه

 

Posted (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 by Master_MTA
Posted
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')

 

Posted
Just now, #AL-J7EEEM said:

الدي بق يقلي خطا ف السطر 204

الي هو


      local allplayers = getElementesByType('player')

 

سوري في خطا املائي ذذ

عدله لهاذا

لاني كنت مزود

e

ذذ

local allplayers = getElementsByType('player')

Posted (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 by #AL-J7EEEM
Posted
Just now, #AL-J7EEEM said:

WARNING:SCRIPT\SERVER.lua:127:Bad argument@'addEvent'[Expected bool at argument 2, got root الدي بق =

السطر رقم

127 

معليش خطا املائي ثاني كنت ناسي

handler

الان بدل ذا بكود السيرفر

  1. addEvent('showchatdata',true)
  2. addEventHandler('showchatdata',root,function(player)
  3. if isElement(player) then
  4. local data=getElementData(player,'dataname')
  5. local acc=getPlayerAccount(player)
  6. if not isGuestAccount(acc) then
  7. outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true)
  8. else
  9. outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true)
  10. end
  11. end
  12. end)
Posted
1 minute ago, Master_MTA said:

معليش خطا املائي ثاني كنت ناسي

handler

الان بدل ذا بكود السيرفر

  1. addEvent('showchatdata',true)
  2. addEventHandler('showchatdata',root,function(player)
  3. if isElement(player) then
  4. local data=getElementData(player,'dataname')
  5. local acc=getPlayerAccount(player)
  6. if not isGuestAccount(acc) then
  7. outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true)
  8. else
  9. outputChatBox('the player name [not logged in] and he is data '..data..' .',root,255,255,255,true)
  10. end
  11. end
  12. end)

الدي بق يقلي في خطأ في السطر رقم 132

outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true)

 

Posted
1 minute ago, #AL-J7EEEM said:

الدي بق يقلي في خطأ في السطر رقم 132


outputChatBox('the player name ['..getAccountName(plr)..'] and he is data '..data..' .',root,255,255,255,true)

 

وشهو الخطا

وش يطلع الدي بق

Posted

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

 
Posted (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 by Master_MTA
Posted

ERROR:SCRIPT\SERVER.lua:128: attempt to call global 'getElementesByType' (a nil valua)الدي بق

          local allplayers=getElementesByType('player')

سطر رقم 128^

Posted
3 minutes ago, #AL-J7EEEM said:

ERROR:SCRIPT\SERVER.lua:128: attempt to call global 'getElementesByType' (a nil valua)الدي بق


          local allplayers=getElementesByType('player')

سطر رقم 128^

قلتلك عدلها يبن الناس


 
  1. مزود e انا وش فيك خذ ذا الصحيح
  1. local allplayers=getElementsByType('player')
Posted
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

Posted
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')

وخلصت السالفة

Posted
4 minutes ago, #!Error.xD said:

local data=getElementData(player,'dataname')

بدلها الي

local data=getElementData(player,'Diamond')

وخلصت السالفة

مسويها كذا انا :)

 

Posted (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 by Deativated
Posted
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 :|

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