Anti miniguns
#5

Quote:
Originally Posted by James Coral
Посмотреть сообщение
Not Ban only

Check Code:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWeapon(killerid) == 38)
    {
      new IP[32];
        for(new p=0;p<MAX_PLAYERS;p++) //Make loop
        {
            GetPlayerIp(p,IP,32);      
                new name[24];
                GetPlayerName(p,name,24);
               BanEx(p,"%s Have been Banned Reason: (minigun), name");              }
        }
        return 1;
    }
    return 1;
}
UNTESTED
So you want to ban everyone, as soon a cheater makes a minigun kill?

Also, I would make a timer and check a player's weapons using GetPlayerWeaponData, since GetPlayerWeapon only checks the weapon you are holding. And OPU gets called lots of times per second, so it would be useless to check for a minigun that often.

EDIT: Sorry for just suggesting something new, instead of helping you fix the problem. I guess your OnPlayerDeath got more code than just a minigun check. So if you just 'return 1;' in the middle (or just after the minigun check), then the rest of the code in OnPlayerDeath won't be called, therefore unreachable. But show us the exact line of where the error occurs.
Reply


Messages In This Thread
Anti miniguns - by lusta19 - 31.12.2011, 11:06
Re: Anti miniguns - by BlackSA - 31.12.2011, 11:12
Re: Anti miniguns - by James Coral - 31.12.2011, 11:13
Re: Anti miniguns - by LiamM - 31.12.2011, 11:14
Re: Anti miniguns - by Mikkel_Pedersen - 31.12.2011, 11:17
Re: Anti miniguns - by lusta19 - 31.12.2011, 11:22
Re: Anti miniguns - by HyperZ - 31.12.2011, 11:33
Re: Anti miniguns - by James Coral - 31.12.2011, 11:38
Re: Anti miniguns - by lusta19 - 31.12.2011, 11:59
AW: Anti miniguns - by BigETI - 31.12.2011, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)