Всех приветствую , помогите найти плагин.amx/sma
Запрет на смену ника на сервере , один раз в 60 сек; интервал.
lop50956 писал(а): > Скажите мне пожалуйста вы скриптер или кто? если да то уж назовите цену я же к вам собираюсь идти хлеб покупать
Я хлебоутка, приходите.
Модератор: Leonidddd
#include <amxmodx>
#include <amxmisc>
#include <reapi>
#pragma semicolon 1
#define NEXT_CHANGE_NAME_TIME 60
enum _:Data
{
NEXTCHANGENAMETIME
};
new Player[33][Data];
new const g_Prefix[] = "^1[^4Сервер^1]";
public plugin_init()
{
register_plugin("Plugin", "1.0", "amx-x");
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoName, "fwdSetClientUserInfoName", false);
}
public fwdSetClientUserInfoName(const id, infobuffer[], szNewName[])
{
if(Player[id][NEXTCHANGENAMETIME] > get_systime())
{
new szSec[16];
get_ending(Player[id][NEXTCHANGENAMETIME] - get_systime(), "секунд", "секунда", "секунды", szSec, charsmax(szSec));
client_print_color(id, print_team_default, "%s ^3Cледующая ^4смена ника ^3будет доступна через ^4%0.f ^3%s^1.", g_Prefix, Player[id][NEXTCHANGENAMETIME] - get_systime(), szSec);
SetHookChainReturn(ATYPE_INTEGER, false);
return HC_SUPERCEDE;
}
Player[id][NEXTCHANGENAMETIME] = NEXT_CHANGE_NAME_TIME;
return HC_CONTINUE;
}
stock get_ending(num, const a[], const b[], const c[], output[], lenght)
{
new num100 = num % 100, num10 = num % 10;
if(num100 >=5 && num100 <= 20 || num10 == 0 || num10 >= 5 && num10 <= 9)
{
format(output, lenght, "%s", a);
}
else if(num10 == 1)
{
format(output, lenght, "%s", b);
}
else if(num10 >= 2 && num10 <= 4)
{
format(output, lenght, "%s", c);
}
}
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : error 017: undefined symbol "client_print_color"
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : warning 215: expression has no effect
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : warning 215: expression has no effect
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : warning 215: expression has no effect
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : error 001: expected token: ";", but found ")"
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : error 029: invalid expression, assumed zero
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : fatal error 107: too many error messages on one line
Compilation aborted.
4 Errors.
nevzorov77 писал(а):vladboss,
- Код: Выделить всё
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : error 017: undefined symbol "client_print_color"
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : warning 215: expression has no effect
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : warning 215: expression has no effect
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : warning 215: expression has no effect
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : error 001: expected token: ";", but found ")"
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : error 029: invalid expression, assumed zero
/hlds/web/www/amxxpc/work/scripting/noname.sma(31) : fatal error 107: too many error messages on one line
Compilation aborted.
4 Errors.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 5