PHP Code:
#include <sourcemod>
int n = 0;
int Lines;
public void OnPluginStart()
{
RegConsoleCmd("sm_test", Command_t);
}
public Action Command_t(int client,int args)
{
CreateTimer(0.1, TIMER,client,TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}
public Action TIMER(Handle timer, any client)
{
char lineBuffer[1024];
Handle fileHandle = OpenFile("addons/sourcemod/configs/badapple.text","r");
Lines = 1;
while(!IsEndOfFile(fileHandle) && ReadFileLine(fileHandle, lineBuffer, sizeof(lineBuffer)))
{
for(int line = 1;line <59; line++)
{
if(Lines == line + n*60)
PrintToConsole(client,"%s",lineBuffer);
}
Lines++;
}
n++;
}
And Here is text file :
https://github.com/bklol/badapple-in...r/badapple.txt
Can anyone tell me why timer stop work,thanks a lot!