25.04.2011, 16:16
Thats all what i did the problam in the end -
in OnPlayerUpdate -
The Problam -
When i start to example race, it's give me ban and reason - use weapon cheat - Desert Eagle
* the problam is in the ResetPlayerWeaponsEX because it's didn't zero the variables of the weapons [i think].. even they didn't on me !!
PLEASE I REALY NEED YOUR HELP !!!
PHP код:
forward GivePlayerWeaponEX(playerid, weaponid, ammo);
public GivePlayerWeaponEX(playerid, weaponid, ammo)
{
SafeWeapon[playerid] = 1;
PlayerHaveWeapon[playerid][weaponid] = 1;
GivePlayerWeapon(playerid, weaponid, ammo);
SetTimerEx("SafeWeapons",1000,0,"%d",playerid);
return 1;
}
forward ResetPlayerWeaponsEX(playerid);
public ResetPlayerWeaponsEX(playerid)
{
SafeWeapon[playerid] = 1;
ResetPlayerWeapons(playerid);
for (new i = 1; i < 54; i++)
{
PlayerHaveWeapon[playerid][i] = 0;
}
SetTimerEx("SafeWeapons",1000,0,"%d",playerid);
SafeWeapon[playerid] = 0;
return 1;
}
forward SafeWeapons(playerid);
public SafeWeapons(playerid)
{
SafeWeapon[playerid] = 0;
return 1;
}
PHP код:
if(PlayerHaveWeapon[playerid][GetPlayerWeapon(playerid)] == 0 && GetPlayerWeapon(playerid) != 0 && SafeWeapon[playerid] == 0)
{
ResetPlayerWeaponsEX(playerid);
if(PlayerChecked2[playerid] == 0)
{
if(PlayerConnect[playerid] == 0)
{
if(Chance2[playerid] == 1)
{
scm(playerid,red,"[Anti_Cheat] Weapon Cheat :чйбмъ бап одщшъ, сйбд");
BanEx(playerid,"Weapon Cheat");
}
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);
PlayerChecked2[playerid] = 1;
SetTimerEx("DownCheckANtiWeapon",10*1000,0,"%d",playerid);
}
}
}
When i start to example race, it's give me ban and reason - use weapon cheat - Desert Eagle
* the problam is in the ResetPlayerWeaponsEX because it's didn't zero the variables of the weapons [i think].. even they didn't on me !!
PLEASE I REALY NEED YOUR HELP !!!