[Tutorial] How to make a Anti-driveby system
#2

What the... This is a tutorial on WHAT to do once the driveby is done with. To actually avoid drive - bys,
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
      if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER)
      {
            new weapons[13][2];
            for (new i = 0; i < 13; i++)
            {
                GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
            }
            ResetPlayerWeapons(playerid);
            if(newstate == PLAYER_STATE_ONFOOT && (oldstate == PLAYER_STATE_PASSENGER || oldstate == PLAYER_STATE_DRIVER) )
            {
                     for( new i; i < 13; i++)
                     {
                           GivePlayerWeapon(playerid, weapons[i][0], weapons[i][1]);
                     }
             }
            return 1;
}
Or obviously just setting the weapon to 0.
Reply


Messages In This Thread
How to make a Anti-driveby punishment system - by BlackHorse - 10.05.2013, 06:00
Re: How to make a Anti-driveby system - by RajatPawar - 10.05.2013, 06:05
Re: How to make a Anti-driveby system - by freddy smyth - 10.05.2013, 06:58
Re: How to make a Anti-driveby system - by Vince - 10.05.2013, 08:25
Re: How to make a Anti-driveby system - by RajatPawar - 10.05.2013, 08:32
Re: How to make a Anti-driveby system - by xser12 - 15.05.2013, 02:11
Re: How to make a Anti-driveby system - by NL-Sultan - 16.05.2013, 19:10
Re: How to make a Anti-driveby system - by Pettersen - 18.05.2013, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)