Raised This Month: $32 Target: $400
 8% 

[CSGO] Why MY Repeat Timer Stop PrintMessage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bklol
Member
Join Date: May 2019
Location: on my chair
Old 10-12-2020 , 10:29   [CSGO] Why MY Repeat Timer Stop PrintMessage
Reply With Quote #1

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.1TIMER,client,TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action TIMER(Handle timerany client)
{
    
char lineBuffer[1024];
    
Handle fileHandle OpenFile("addons/sourcemod/configs/badapple.text","r");
    
Lines 1;
    while(!
IsEndOfFile(fileHandle) && ReadFileLine(fileHandlelineBuffersizeof(lineBuffer)))
    {
        for(
int line 1;line <59line++)
        {
            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!

Last edited by bklol; 10-12-2020 at 10:30.
bklol is offline
 


Thread Tools
Display Modes

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 20:49.


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