Shadowless
Пользователь
- Регистрация
- 24 Фев 2019
- Сообщения
- 237
- Симпатии
- 4
- Пол
- Мужской
помогите сделать .sma file
C++:
#pragma semicolon 1
#pragma ctrlchar '\'
new g_cvar_ping;
new g_cvar_flux;
new g_max_players;
new g_ping;
new g_flux;
new g_off_set[33][2];
new g_argument[33][3];
new g_over_ride[33] =
{
-1, ...
}
public plugin_init()
{
register_plugin("Ping Faker", "1.0", "AMXX Dev Team");
register_forward(FM_UpdateClientData, "fm_update_client_data", 0);
g_cvar_ping = register_cvar("pf_ping", "12", 0, 0.00);
g_cvar_flux = register_cvar("pf_flux", "4", 0, 0.00);
g_max_players = get_maxplayers();
return 0;
}
public plugin_cfg()
{
set_task(0.50, "plugin_read", 3426422, "", 0, "", 0);
return 0;
}
public plugin_read()
{
g_ping = clamp(get_pcvar_num(g_cvar_ping), 0, 4095);
g_flux = clamp(get_pcvar_num(g_cvar_flux), 0, 4095);
set_task(2.00, "plugin_check", 4235621, "", 0, "b", 0);
return 0;
}
public client_disconnect(id)
{
g_over_ride[id] = -1;
return 0;
}
public fm_update_client_data(id)
{
!!! Removed Phi
if (!pev(id, pev_button) & 32768 && !pev(id, pev_oldbuttons) & 32768)
{
return 0;
}
static sending;
static player;
sending = 0;
player = 1;
while (player <= g_max_players)
{
if (is_user_connected(player))
{
switch (sending)
{
case 0:
{
message_begin(MSG_ONE_UNRELIABLE, SVC_PINGS, 1488, id);
write_byte(player + -1 * 2 + 1 + g_off_set[player][0][0][0] * 64);
write_short(g_argument[player][0][0][0]);
sending += 1;
}
case 1:
{
write_byte(player + -1 * 4 + 2 + g_off_set[player][0][0][1] * 128);
write_short(g_argument[player][0][0][1]);
sending += 1;
}
case 2:
{
write_byte(player + -1 * 8 + 4);
write_short(g_argument[player][0][0][2]);
write_byte(0);
message_end();
sending = 0;
}
default:
{
}
}
}
player += 1;
}
if (sending)
{
write_byte(0);
message_end();
}
return 0;
}
/ * ERROR! Unrecognized opcode: neg * /
function "plugin_check"
public plugin_check()
Вложения
-
4 KB Просмотры: 0