r1kardo
Ученик
Здраствуйте уважаемые пользователи pawno-info !
Оптимизируйте под свой мод.
Автор: Неизвестен.
Вырезано: Мод MyGame.
PHP:
//++++++++++++++++++++++++++++++++++КРИК ЗАКОНА++++++++++++++++++++++++++++++++++++++++++++++++++
if(strcmp(cmd, "/zakon", true) == 0 || strcmp(cmd, "/z", true) == 0)
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Используйте: /z [текст]");
return 1;
}
if(antiflood[playerid] == 0)
{
format(string, sizeof(string), "Служитель Закона %s: %s", sendername, result);
ProxDetector(30.0, playerid, string,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
printf("%s", string);
antiflood[playerid] = 0;
SetTimer("antifloodon", antifloodtimer, 0);
}
else
{
//format(string, sizeof(string), "*Команды разрешено вводить только один раз в секунду!"); // if(antiflood[playerid] == 0)
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
printf("Использвалась команда %s",cmd);
return 1;
}
