Perfect Amazin
Новичок
Добавил, все ок, нету варнингов , нету ошибок.
Там где кикало в античите - я заменил на то что бы добавляло в строку(AddCheater(0,playerid)
, но оно не добавляет.. ( Хотя в чат пишет что добавлен в панель предп. читеров )
Вот сам код
К переменным добавил:
в ongamemodeinit:
К стокам:
Добавил появление текстдрава в сток LoadPlayerAccount
Вместо кика в античите добавил: AddCheater(0,playerid); , выглядит это как то так
Там где кикало в античите - я заменил на то что бы добавляло в строку(AddCheater(0,playerid)
Вот сам код
К переменным добавил:
Код:
const max_cheat_text = 10;
new Text:CheatText[2][max_cheat_text];
Код:
new Float:DrawPos = 25.000000;
for(new i;i < max_cheat_text;i++)
{
if(i > 0) DrawPos+=30;
CheatText[0][i] = TextDrawCreate(DrawPos,423.000000,"_");
CheatText[1][i] = TextDrawCreate(DrawPos,434.000000,"_");
TextDrawColor(CheatText[0][i], 0xef8100FF),TextDrawColor(CheatText[1][i], 0xffffffFF);
TextDrawFont(CheatText[0][i], 1),TextDrawFont(CheatText[1][i], 1);
TextDrawSetOutline(CheatText[0][i], 1),TextDrawSetOutline(CheatText[1][i], 1);
TextDrawLetterSize(CheatText[0][i],0.3500,1.270),TextDrawLetterSize(CheatText[1][i],0.3500,1.270);
}
Код:
stock AddCheater(pos,playerid = -1)
{
if(pos < 0 || pos > 3) return 0;
static cheat_position[2];
if(pos < 2)
{
new str_id[3];
valstr(str_id,playerid);
TextDrawSetString(CheatText[pos][cheat_position[pos]], str_id);
cheat_position[pos]++;
if(cheat_position[pos] > max_cheat_text-1) cheat_position[pos] = 0;
}
else
{
cheat_position[pos-2] = 0;
for(new i; i < max_cheat_text; i++){
TextDrawSetString(CheatText[pos-2][i], "_");
}
}
return 1;
}
Код:
if(PlayerInfo[playerid][bAdmin] >= 1)// Если уровень админки игрока больше или ровно 1 - показываем тексдрайв ( pAdmin - переменная админки )
{
for(new i;i < max_cheat_text;i++) TextDrawShowForPlayer(playerid, CheatText[0][i]),TextDrawShowForPlayer(playerid, CheatText[1][i]);
}
Код:
{
case AC_FLY_HACK_code: AddCheater(0,playerid);
case AC_FLY_HACKTP_code: AddCheater(0,playerid);
case AC_FLY_HACKTP_MOUSE_code: AddCheater(0,playerid);
case AC_FLY_CARHACK_code: AddCheater(0,playerid);
case AC_SPEED_HACKCAR_code: AddCheater(0,playerid);
case AC_AIRBRK_HACK_code: AddCheater(0,playerid);
case AC_AIRBRK_CARHACK_code: AddCheater(0,playerid);
case AC_GM_1_CODE: AddCheater(0,playerid);
case AC_GM_2_CODE: AddCheater(0,playerid);
}
if(strlen(stringa)) ABroadCast(COLOR_GREY, stringa, 1);
}
case AC_KICK:
{
format(stringa, 128, "%s[%d] был добавлен в панель предполагаемых читеров.", PlayerInfo[playerid][pNames], playerid);
ABroadCast(0xFF6347FF, stringa, 1);
AddCheater(0,playerid);
}
