Raised This Month: $ Target: $400
 0% 

Table Buffer for Console


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Electr000999
Senior Member
Join Date: Aug 2011
Old 07-12-2016 , 06:59   Re: Table Buffer for Console
Reply With Quote #3

test failed if i try write like this

Code:
#include <sourcemod>
#include <consoletable>

public Plugin myinfo = 
{
	name = "Console Table Test",
	author = "Ofir",
	description = "",
	version = "1.0",
	url = "steamcommunity.com/id/OfirGal1337"
};

public void OnPluginStart()
{
	RegConsoleCmd("sm_table", Command_Table);
}

public Action Command_Table(int client, int args)
{
	new String:sBuffer[1024];
	new String:sValues[8][4][64];

	for (int i = 0; i < 8; i++)
	{
		for (int j = 0; j < 4; j++)
		{
			// FORMAT 1 COLUMN HEADER NAME 
			if(i == 0 && j == 0)
				FormatEx(sValues[i][j], 64, "Col 1");
			// FORMAT 1 COLUMN ROW DATA
			else if(i == 1 && j == 0)
				FormatEx(sValues[i][j], 64, "Row 1");
			else if(i == 2 && j == 0)
				FormatEx(sValues[i][j], 64, "Row 2 tuyi9o");
			else if(i == 3 && j == 0)
				FormatEx(sValues[i][j], 64, "Row 3");
			else if(i == 4 && j == 0)
				FormatEx(sValues[i][j], 64, "Row 4 fjuhkiuuloil");
			else if(i == 5 && j == 0)
				FormatEx(sValues[i][j], 64, "Row 5 fjuhkiuuloil");
			else if(i == 6 && j == 0)
				FormatEx(sValues[i][j], 64, "Row 6 fjuhkiuuloil");
			else if(i == 7 && j == 0)
				FormatEx(sValues[i][j], 64, "Row 7 fjuhkiuuloil");				
			// FORMAT OTHER HEADER COLUMNS
			else if(i == 0 && j == 1)
				FormatEx(sValues[i][j], 64, "Col 2");
			else if(i == 0 && j == 2)
				FormatEx(sValues[i][j], 64, "Col 3");
			else if(i == 0 && j == 3)
				FormatEx(sValues[i][j], 64, "Col 4");	
			else
				FormatEx(sValues[i][j], 64, "%d", GetRandomInt(1,6567888));
		}
	}

	MakeConsoleTable(sBuffer, sizeof(sBuffer), sValues, 8, 4);

	PrintToConsole(client, sBuffer);

	return Plugin_Handled;
}

//http://i.imgur.com/akppDbP.png
I am write in first column same spam like a different player names.
Attached Thumbnails
Click image for larger version

Name:	3366.PNG
Views:	221
Size:	12.1 KB
ID:	156172  

Last edited by Electr000999; 07-12-2016 at 07:00.
Electr000999 is offline
Send a message via Skype™ to Electr000999
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode