Ложные срабатывания античита.
Цель античитта заменить GivePlayerWeapon на GiveWeapon
Код:
Код
new Weapon[MAX_PLAYERS][47];
SetTimer("CheckWeapon",1000,1);
for(new i=0;i<47;i++) Weapon[playerid][i]=0;
stock GiveWeapon(playerid,weaponid,amo)
{
Weapon[playerid][weaponid] += amo;
GivePlayerWeapon(playerid,weaponid,amo);
}
stock ResetWeapon(playerid)
{
ResetPlayerWeapons(playerid);
for(new i=0;i<47;i++)
{
if(Weapon[playerid][i] > 0) GivePlayerWeapon(playerid,i,Weapon[playerid][i]);
}
}
public CheckWeapon()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
new gun[MAX_PLAYERS],ammo[MAX_PLAYERS];
gun[i] = GetPlayerWeapon(i);
ammo[i] = GetPlayerAmmo(i);
if(ammo[i] > Weapon[i][gun[i]]){ResetWeapon(i);}
if(ammo[i] < Weapon[i][gun[i]]){Weapon[i][gun[i]] = ammo[i];}
}
}
Можно как нибудь убрать замер и for(new i=0;i<47;i++) Weapon[playerid][i]=0;
И просто заменить GivePlayerWeapon на GiveWeapon