Jump to content

table +1


Recommended Posts

سلام عليكم

ابي كل مرة اكتب الامر تيجي الكلمة الي بعدها في الجدول 

المشكلة لما اجي اكتب الامر 4 مرات , وتيجي الكلمة الاخيرة

اجي اكتب مرة خامسة ما يطلع شي ولما اكتب سادسة تطلع ,

local shrkaNames,countTable = { 
[1] = {"ش","10000"},
[2] = {"شرة","5000"},
[3] = {" ..","1000"},
[4] = {"h","500"},
},0

addCommandHandler("hey",
	function()
				countTable = countTable + 1 
		if ( countTable >= #shrkaNames+1 )  then countTable = 0 end
		
		outputChatBox(shrkaNames[countTable][1],root,255,0,0,true)
		outputChatBox(countTable,root,255,0,0,true)
	end
)

@N3xT - كنت سويتها لي قبل , بس الكود راح

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