my anti-cheat not always work :( please help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: my anti-cheat not always work :( please help (
/showthread.php?tid=252508)
my anti-cheat not always work :( please help -
tal_peretz - 01.05.2011
PHP код:
if(PlayerHaveWeapon[playerid][GetPlayerWeapon(playerid)] == 0 && GetPlayerWeapon(playerid) != 0 && SafeWeapon[playerid] == 0 && !IsPlayerInAnyVehicle(playerid))
{
if(PlayerChecked2[playerid] == 0)
{
if(PlayerConnect[playerid] == 0)
{
Chance2[playerid]++;
new string[128],gunname[25];
GetWeaponNameEx(GetPlayerWeapon(playerid), gunname, sizeof(gunname));
format(string, sizeof(string), "[%s] тн зщщ мц'йи рщчйн, ра ифм бочшд жд [ID: %d] %s",gunname,playerid,GetName(playerid));
scmAdmin(white,string);
ResetPlayerWeaponsEX(playerid);
PlayerChecked2[playerid] = 1;
SetTimerEx("DownCheckANtiWeapon",5*1000,0,"%d",playerid);
}
}
}
PHP код:
forward GivePlayerWeaponEX(playerid, weaponid, ammo);
public GivePlayerWeaponEX(playerid, weaponid, ammo)
{
SafeWeapon[playerid] = 1;
PlayerHaveWeapon[playerid][weaponid] = 1;
GivePlayerWeapon(playerid, weaponid, ammo);
SafeWeapon[playerid] = 0;
return 1;
}
forward ResetPlayerWeaponsEX(playerid);
public ResetPlayerWeaponsEX(playerid)
{
SafeWeapon[playerid] = 1;
ResetPlayerWeapons(playerid);
for (new i = 1; i < 54; i++)
{
PlayerHaveWeapon[playerid][i] = 0;
}
SafeWeapon[playerid] = 0;
return 1;
}
that's work but not always and i don't know why.. sometimes it's send message to admins to free ..
anyone see any problem? please
Re: my anti-cheat not always work :( please help -
tal_peretz - 02.05.2011
now that's happend all the time
![Sad](images/smilies/sad.gif)
!!!! pleaseeeeeeeeee
Re: my anti-cheat not always work :( please help -
tal_peretz - 09.05.2011
jumping after 5 days.......
maybe that's because the weapons has been removed when they are in afk ?
Re: my anti-cheat not always work :( please help -
[MWR]Blood - 09.05.2011
Make loops to check through all players, not just playerid.
Re: my anti-cheat not always work :( please help -
tal_peretz - 09.05.2011
with new public and timer? and a few millisecond? 100/1000/1 ?
Re: my anti-cheat not always work :( please help -
tal_peretz - 09.05.2011
i did loop every 100 millisecond the same happend
pleaseeeeee help
![Sad](images/smilies/sad.gif)
!!!!!!!!!!!!!