All pastes #147925 Raw Edit

mabako

public text v1 · immutable
#147925 ·published 2006-08-24 19:28 UTC
rendered paste body
#include <a_samp>
#include <file>

#define STR_LEN 512

public OnFilterScriptInit() {
	print("\n----------------------------------");
	print("Filterscript AlienX Advanced Admin Echo sucessfully loaded");
	print("----------------------------------\n");
	//SetTimer("CreateTable",2000,1);
}

public OnFilterScriptExit() {
	print("\n----------------------------------");
	print("Filterscript AlienX Advanced Admin Echo sucessfully un-loaded");
	print("----------------------------------\n");
}

public ReadPlayerName(playerid) {
	new strName[255];
	
	GetPlayerName(playerid, strName, 255);
	return strName;
}

public CreateTable () {
	new xPlayername[255];
	new Playername;
	new PlayerHealth;
	new PlayerID;
	new File:file;
	new Buffer[STR_LEN];
	new strName[255];
/*	
	if ((file = fopen("alienxecho.txt"))) // Note the double (()), this is to avoid the compiler complaining about unintended assignments
	{
		for(new i=0; i<MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				PlayerHealth = 0;
				PlayerID = 0;
			    PlayerID = i;
			    strName = ReadPlayerName(i);
                format(Buffer, STR_LEN, "%d%s", strName, i);

				fwrite(file, Buffer);
			}
		}
		fclose(file);
	}
	else
	{
		print("Error: could not open file alienxecho.txt for writing, please ensure you have a scriptfiles directory");
	}*/
}