26.06.2011, 11:41
can this fail when used as a anticheat?
at the top
idk...but some ppl have been banned an they rekon they never had that weapon, but before it was like this i had it on a sendadminmsg for a few months and we tested it heaps with all those weapons an others like the minigun an it only sent the msg to the admins when they were physically holding that weapon an not for having it in their inventory or on person.
So i thought i better ask, just to make sure, can this Fail?
at the top
pawn Код:
//#define WEAPON_TEARGAS(17)//is already defined in a_samp.inc
#define WEAPON_NIGHTVISION (44)//not sure you can do this idk...
#define WEAPON_THERMAL (45)//same as above
//--------------------------------------
//on a (1 second timer)
if (PlayerLoggedIn[i] != 0)//checks if they are logged in
{
WeaponCheck(i);
}
//--------------------------------------
}
public WeaponCheck(playerid)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerWeapon(playerid) == WEAPON_TEARGAS)//checks for weapon (in-hand)
{
BAN
return 1;
}
if(GetPlayerWeapon(playerid) == WEAPON_THERMAL)//checks for weapon (in-hand)
{
BAN
return 1;
}
if(GetPlayerWeapon(playerid) == WEAPON_NIGHTVISION)//checks for weapon (in-hand)
{
BAN
return 1;
}
}
}
So i thought i better ask, just to make sure, can this Fail?