gv плагин я воопше удалил, с этим нет проблем@Rutamaqyg, Как минимум нужен нам gv.sp
Разве?А как же ошибки@Rutamaqyg, Ну и остались у вас 2 ошибки. для одной из них нужен [PlayersLife.Ru]autochangemap.sp а для другой просто пополнить баланс токенов.
Данную ошибку вызывал плагин gv.smx но так как вы его удалили больше проблем нет.L 08/06/2017 - 15:52:44: [SM] [5] Line 2171, E:\scripting\sourcebans.sp::CheckLoadAdmins
L 08/06/2017 - 15:52:44: [SM] [6] Line 1755, E:\scripting\sourcebans.sp::GroupsDone
08/06/2017 - 10:32:10: [SM] Exception reported: Invalid timer handle a08035e (error 3)
L 08/06/2017 - 15:53:28: [SM] Exception reported: Array index is out of bounds
@Rutamaqyg, нужен [PlayersLife.Ru]autochangemap.sp
Вот@Rutamaqyg,
Данную ошибку вызывал плагин gv.smx но так как вы его удалили больше проблем нет.
#pragma semicolon 1
#include <sourcemod>
#pragma tabsize 0
#pragma newdecls required
Handle g_hTimer,
new_map,
map_idle_time,
Timelimit_H,
Command_S,
PlayersC;
int status;
public Plugin myinfo =
{
name = "Auto change map",
author = "Mleczam",
description = "Change the map if there are no players on the server for a defined time",
version = "1.3",
url = "http://www.sect-of-death.com.pl/"
}
public void OnPluginStart()
{
Command_S = CreateConVar("sm_cm_command","sm_setnextmap","When mp_timelimit is not 0 uses this command - use ma_setnextmap for MAP or sm_setnextmap for sourcemod");
map_idle_time = CreateConVar("sm_cm_idlechange","5","When no players after this time server changes the map");
new_map = CreateConVar("sm_cm_nextmap","de_dust2","Name of the map for change without .bsp");
PlayersC = CreateConVar("sm_cm_players","6","How many players should by to change the map");
Timelimit_H = FindConVar("mp_timelimit");
AutoExecConfig(true, "autochangemap");
status = 0;
}
public void OnMapStart()
{
g_hTimer = CreateTimer(60.0, sprawdz ,0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
status = 0;
}
public Action sprawdz(Handle Timer)
{
int ccount;
int NOfClients = GetClientCount(true);
for (int i = 1; i <= NOfClients ; i++)
if (IsClientInGame(i) && !IsFakeClient(i))
{
ccount++;
}
if( ccount > GetConVarFloat(PlayersC) || status)
return Plugin_Handled;
KillTimer(g_hTimer);
g_hTimer = null;
g_hTimer = CreateTimer(GetConVarFloat(map_idle_time)*60, sprawdz2);
return Plugin_Handled;
}
public Action sprawdz2(Handle Timer)
{
char str[128];
char mapname[128];
char command_s[64];
int ccount;
int NOfClients = GetClientCount(true);
g_hTimer = null;
for (int i = 1; i <= NOfClients; i++)
if (IsClientInGame(i) && !IsFakeClient(i))
{
ccount++;
}
if( ccount > GetConVarFloat(PlayersC) )
{
g_hTimer = CreateTimer(60.0, sprawdz ,_, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
return Plugin_Handled;
}
else
{
GetCurrentMap(mapname,sizeof(mapname));
GetConVarString(new_map, str, sizeof(str));
if( strcmp(mapname, str, false) )
{
if( IsMapValid(str) ) ServerCommand("changelevel %s",str);
return Plugin_Handled;
}
else if(GetConVarFloat(Timelimit_H))
{
GetConVarString(Command_S,command_s,sizeof(command_s));
ServerCommand("%s %s",command_s,str);
status = 1;
}
}
return Plugin_Handled;
}
сейчас попробую, его компилить надо и smx тоже кидать да?Сори за тупой вопрос@Rutamaqyg, Может так?
PHP:#pragma semicolon 1 #include <sourcemod> #pragma tabsize 0 #pragma newdecls required Handle g_hTimer, new_map, map_idle_time, Timelimit_H, Command_S, PlayersC; int status; public Plugin myinfo = { name = "Auto change map", author = "Mleczam", description = "Change the map if there are no players on the server for a defined time", version = "1.3", url = "http://www.sect-of-death.com.pl/" } public void OnPluginStart() { Command_S = CreateConVar("sm_cm_command","sm_setnextmap","When mp_timelimit is not 0 uses this command - use ma_setnextmap for MAP or sm_setnextmap for sourcemod"); map_idle_time = CreateConVar("sm_cm_idlechange","5","When no players after this time server changes the map"); new_map = CreateConVar("sm_cm_nextmap","de_dust2","Name of the map for change without .bsp"); PlayersC = CreateConVar("sm_cm_players","6","How many players should by to change the map"); Timelimit_H = FindConVar("mp_timelimit"); AutoExecConfig(true, "autochangemap"); status = 0; } public void OnMapStart() { g_hTimer = CreateTimer(60.0, sprawdz ,0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE); status = 0; } public Action sprawdz(Handle Timer) { int ccount; int NOfClients = GetClientCount(true); for (int i = 1; i <= NOfClients ; i++) if (IsClientInGame(i) && !IsFakeClient(i)) { ccount++; } if( ccount > GetConVarFloat(PlayersC) || status) return Plugin_Handled; KillTimer(g_hTimer); g_hTimer = null; g_hTimer = CreateTimer(GetConVarFloat(map_idle_time)*60, sprawdz2); return Plugin_Handled; } public Action sprawdz2(Handle Timer) { char str[128]; char mapname[128]; char command_s[64]; int ccount; int NOfClients = GetClientCount(true); g_hTimer = null; for (int i = 1; i <= NOfClients; i++) if (IsClientInGame(i) && !IsFakeClient(i)) { ccount++; } if( ccount > GetConVarFloat(PlayersC) ) { g_hTimer = CreateTimer(60.0, sprawdz ,_, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE); return Plugin_Handled; } else { GetCurrentMap(mapname,sizeof(mapname)); GetConVarString(new_map, str, sizeof(str)); if( strcmp(mapname, str, false) ) { if( IsMapValid(str) ) ServerCommand("changelevel %s",str); return Plugin_Handled; } else if(GetConVarFloat(Timelimit_H)) { GetConVarString(Command_S,command_s,sizeof(command_s)); ServerCommand("%s %s",command_s,str); status = 1; } } return Plugin_Handled; }
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(33) : error 147: new-style declarations are required
Спасибо, можеш помочь еще в этой теме?Нагрузка на сервер@Rutamaqyg, Не знаю. У меня без проблем все :)
Вот скомпилированный