Block Command

Block Command 0.0.2

Нет прав для скачивания
Сообщения
336
Реакции
396
Предупреждения
5
Помог
7 раз(а)
Albertio добавил(а) новый ресурс:

Block Command - Запрет команд по флагу, steamid или для всех

Плагин позволяет блокировать команды. Есть возможность блокировать команды с определенным аргументом.

Можно настроить кому будет запрещено использовать команды:
  • для всех
  • для отдельного игрока по steamid
  • по отсутствию флага
Узнать больше об этом ресурсе...
 
Сообщения
44
Реакции
1
What do you think to add a custom time
For example, "say" "/top" "b" "03/07/2023 15:30:00" "03/07/2023 20:30:00" at this time, no one will be able to use this command until the time finish
Also add disable plugins "admin.amxx" "" "" "03/07/2023 15:30:00" "03/07/2023 20:30:00"
 

tsybash

AMXX CRACKER
Сообщения
37
Реакции
-22
Chillblaze, скомпилировать ReHLDS
1. Download ReHLDS sources from here: github.com/dreamstalker/rehlds/archive/master.zip
2. Unzip master.zip and then go to: rehlds-master/rehlds/engine (Now you are in engine folder)
3. We will edit the sources, Open host_cmd.cpp and find:

Cmd_AddCommand("status", Host_Status_f);
Comment this line so it should be:

// Cmd_AddCommand("status", Host_Status_f);
4. You can also comment the whole void Host_Status_f(void) function, search for it and comment it so it should be like:








/*void Host_Status_f(void)

{

client_t *client;

int seconds;

int minutes;

int hltv_slots = 0;

int hltv_specs = 0;

int hltv_delay = 0;

char *val;

int hours;

int j;

int nClients;

qboolean log = FALSE;

qboolean conprint = FALSE;

qboolean bIsSecure;

qboolean bWantsToBeSecure;

qboolean bConnectedToSteam3;

const char *pchConnectionString = "";

const char *pchSteamUniverse = "";



if (cmd_source == src_command)

{

conprint = TRUE;



if (!g_psv.active)

{

Cmd_ForwardToServer();

return;

}

}



#ifndef REHLDS_FIXES // Remove Useless Stuff

char szfile[260];

if (Cmd_Argc() == 2 && !Q_stricmp(Cmd_Argv(1), "log"))

{

log = TRUE;

Q_snprintf(szfile, sizeof(szfile), "%s", "status.log");

_unlink(szfile);

}

#endif // REHLDS_FIXES



Host_Status_Printf(conprint, log, "hostname: %s\n", Cvar_VariableString("hostname"));



bIsSecure = Steam_GSBSecure();

bWantsToBeSecure = Steam_GSBSecurePreference();

bConnectedToSteam3 = Steam_GSBLoggedOn();



if (!bIsSecure && bWantsToBeSecure)

{

pchConnectionString = "(secure mode enabled, connected to Steam3)";

if (!bConnectedToSteam3)

{

pchConnectionString = "(secure mode enabled, disconnected from Steam3)";

}

}

if (g_psv.active)

{

pchSteamUniverse = Steam_GetGSUniverse();

}



val = "insecure";

if (bIsSecure)

val = "secure";



Host_Status_Printf(conprint, log, "version : %i/%s %d %s %s%s (%d)\n", PROTOCOL_VERSION, gpszVersionString, build_number(), val, pchConnectionString, pchSteamUniverse, GetGameAppID());

if (!noip)

{

Host_Status_Printf(conprint, log, "tcp/ip : %s\n", NET_AdrToString(net_local_adr));

}

#ifdef _WIN32

if (!noipx)

{

Host_Status_Printf(conprint, log, "ipx : %s\n", NET_AdrToString(net_local_ipx_adr));

}

#endif // _WIN32

Host_Status_Printf(conprint, log, "map : %s at: %d x, %d y, %d z\n", g_psv.name, r_origin[0], r_origin[1], r_origin[2]);

SV_CountPlayers(&nClients);

Host_Status_Printf(conprint, log, "players : %i active (%i max)\n\n", nClients, g_psvs.maxclients);

Host_Status_Printf(conprint, log, "# name userid uniqueid frag time ping loss adr\n");



int count = 1;

client = g_psvs.clients;

for (j = 0; j < g_psvs.maxclients; j++, client++)

{

if (!client->active)

{

continue;

}



hours = 0;

seconds = realtime - client->netchan.connect_time;

minutes = seconds / 60;

if (minutes)

{

seconds %= 60;

hours = minutes / 60;

if (hours)

minutes %= 60;

}



if (!client->fakeclient)

val = SV_GetClientIDString(client);

else val = "BOT";



Host_Status_Printf(conprint, log, "#%2i %8s %i %s", count++, va("\"%s\"", client->name), client->userid, val);

if (client->proxy)

{

const char *userInfo = Info_ValueForKey(client->userinfo, "hspecs");

if (Q_strlen(userInfo))

hltv_specs = Q_atoi(userInfo);



userInfo = Info_ValueForKey(client->userinfo, "hslots");

if (Q_strlen(userInfo))

hltv_slots = Q_atoi(userInfo);



userInfo = Info_ValueForKey(client->userinfo, "hdelay");

if (Q_strlen(userInfo))

hltv_delay = Q_atoi(userInfo);



Host_Status_Printf(conprint, log, " hltv:%u/%u delay:%u", hltv_specs, hltv_slots, hltv_delay);

}

else

Host_Status_Printf(conprint, log, " %3i", (int)client->edict->v.frags);



if (hours)

Host_Status_Printf(conprint, log, " %2i:%02i:%02i", hours, minutes, seconds);

else Host_Status_Printf(conprint, log, " %02i:%02i", minutes, seconds);



Host_Status_Printf(conprint, log, " %4i %3i", SV_CalcPing(client), (int)client->packet_loss);

if ((conprint || client->proxy) && client->netchan.remote_address.type == NA_IP)

{

Host_Status_Printf(conprint, log, " %s\n", NET_AdrToString(client->netchan.remote_address));

}

else Host_Status_Printf(conprint, log, "\n");

}

Host_Status_Printf(conprint, log, "%i users\n", nClients);

}*/


5. Open host_cmd.h and comment:

void Host_Status_f(void)
To be:

// void Host_Status_f(void);
6. Now compile ReHLDS and it's done.


Some notes:

1. Steps 4, 5 are optional
2. How to compile ReHLDS for linux: www.youtube.com/watch?v=IdIphOql6ss
3. You can compile for windows using visual studio, simple.
4. You can change Host_Status_f() function to display whatever you need. For example you may not remove or comment the command but change this function to only display: Sorry there is no status or whatever you need.

Here is a compiled ReHLDS with this status command blocked for linux: engine_i486.so I advice you to compile it yourself it's easy.
 
Сообщения
57
Реакции
10
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
tsybash, стоит изучить пример, того, как стоит, предоставлять правильный понятный вариант, не только чтобы его копировать! Есть для этого статьи на форуме!
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу