26.06.2011, 12:56
so this is the right way to go about it, i did it like this so the player still has to be physically holding the gun and if they are its only then it checks the gun+ammo as you can see...
correct?
pawn Код:
}
public WeaponCheck(playerid)
{
if(IsPlayerConnected(playerid))
{
new cheatweapon, cheatammo;
for (new i=0; i<13; i++)
{
GetPlayerWeaponData(playerid, i, cheatweapon, cheatammo);
if(GetPlayerWeapon(playerid) == WEAPON_TEARGAS)
{
if(cheatweapon == WEAPON_TEARGAS && cheatammo >= 1)
{
//ban
//return 1;
}
// nextcheck...