Sanjay Singh
Пользователь
- Регистрация
- 2 Июл 2017
- Сообщения
- 6
- Симпатии
- 0
- Пол
- Мужской
store score & restore score not working
Код:
#include <amxmodx>
#include <reapi>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Author"
new float: F [33];
new D [33];
public plugin_init ()
{
register_plugin (PLUGIN, VERSION, AUTHOR)
register_clcmd ("say / s", "Store");
register_clcmd ("say / r", "Restore");
}
public Store (id)
{
new players [32], num, x
get_players (players, num, "ch")
for (new i = 0; i <num; i ++)
{
x = players [i]
if (is_user_connected (x))
{
F [x] = get_entvar (x, var_frags);
D [x] = get_entvar (x, m_iDeaths);
}
client_print_color (0, -1, "F:% f, D:% i", F [x], D [x]);
}
}
public Restore (id)
{
new players [32], num, x
get_players (players, num, "ch")
for (new i = 0; i <num; i ++)
{
x = players [i]
if (is_user_connected (x))
{
set_entvar (x, var_frags, F [x]);
set_entvar (x, m_iDeaths, D [x]);
}
client_print_color (0, -1, "F:% f, D:% i", F [x], D [x]);
}
} [/ CODE]