Create counter

KaKeRo

Участник
Сообщения
25
Реакции
1
Hey
Pease help me to create a counter that count all players
I mean for example when i type in chat !time that increase +1 for all players
 

Kruzya

Участник
Сообщения
12,970
Реакции
10,924
  • Команда форума
  • #2
C-подобный:
#include <sourcemod>

int g_iTime;

public void OnPluginStart()
{
    RegConsoleCmd("sm_time", OnTimeCmd);
}

public Action OnTimeCmd(int iClient, int iArgC)
{
    ReplyToCommand(iClient, "[SM] Current counter: %d", ++g_iTime);
    return Plugin_Handled;
}
 
Сверху Снизу