Raised This Month: $51 Target: $400
 12% 

Plugin with loop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SnowWolf
Junior Member
Join Date: Sep 2017
Old 01-19-2018 , 11:22   Plugin with loop
Reply With Quote #1

Hello, i search example plugin that uses Loop
I want to copy the command "PrintToConsole ("Cleaing chat")" 1000 times

Anyone can write an example plugin?

Thank you in advance
SnowWolf is offline
xFlane
AlliedModders Donor
Join Date: Nov 2017
Location: Israel
Old 01-19-2018 , 11:41   Re: Plugin with loop
Reply With Quote #2

PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo = {
    
name        "",
    
author      "",
    
description "",
    
version     "0.0.0",
    
url         ""
};

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_1000times"cmd_loop);
}

public 
Action cmd_loop(int clientint args)
{
    for(
int i=01000i++)
    {
        
PrintToConsole(client"Cleaning Chat");
    }

is that what you were looking for?
__________________
Taking private requests.
xFlane is offline
Reply



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


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