[FilterScript] Simple anti drive by for SA-MP 0.3b
#1

Hello. This is anti drive by (it's working correctly with SA-MP 0.3b).

pawn Код:
new PlayerWeapon[MAX_PLAYERS][13];
new PlayerAmmo[MAX_PLAYERS][13];

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
        for (new i = 0; i<13; i++)
        {
                GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerAmmo[playerid][i]);
        }
        ResetPlayerWeapons(playerid);
}
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
        for(new i=0;i<13;i++)
        {
                GivePlayerWeapon(playerid,PlayerWeapon[playerid][i],PlayerAmmo[playerid][i]);
        }
}
return 1;
}
Do not forget to reset PlayerWeapon and PlayerAmmo variables on OnPlayerDisconnect or OnPlayerConnect.
Reply


Messages In This Thread
Simple anti drive by for SA-MP 0.3b - by BuLLeT[LTU] - 22.08.2010, 14:52
Re: Simple anti drive by for SA-MP 0.3b - by wups - 22.08.2010, 16:34
Re: Simple anti drive by for SA-MP 0.3b - by sergio_xd - 22.08.2010, 16:51
Re: Simple anti drive by for SA-MP 0.3b - by BuLLeT[LTU] - 22.08.2010, 17:34
Re: Simple anti drive by for SA-MP 0.3b - by wups - 22.08.2010, 17:45
Re: Simple anti drive by for SA-MP 0.3b - by H0rn - 22.08.2010, 19:19
Respuesta: Simple anti drive by for SA-MP 0.3b - by ipsBruno - 22.08.2010, 19:45
Re: Simple anti drive by for SA-MP 0.3b - by RenisiL - 23.08.2010, 08:41
Re: Simple anti drive by for SA-MP 0.3b - by BuLLeT[LTU] - 23.08.2010, 08:51
Re: Simple anti drive by for SA-MP 0.3b - by RenisiL - 23.08.2010, 09:25
Re: Simple anti drive by for SA-MP 0.3b - by BuLLeT[LTU] - 23.08.2010, 09:32
Re: Simple anti drive by for SA-MP 0.3b - by MisterTickle - 23.08.2010, 14:00
Re: Simple anti drive by for SA-MP 0.3b - by Hip-hop - 01.09.2010, 19:54
Re: Simple anti drive by for SA-MP 0.3b - by Calgon - 02.09.2010, 06:15
Re: Simple anti drive by for SA-MP 0.3b - by VantagePoint - 02.09.2010, 15:59
Re: Simple anti drive by for SA-MP 0.3b - by Gigi-The-Beast - 02.09.2010, 19:20
Re: Simple anti drive by for SA-MP 0.3b - by Las Venturas CNR - 15.09.2010, 02:21
Re : Simple anti drive by for SA-MP 0.3b - by spiirou - 19.09.2010, 10:43
Re: Simple anti drive by for SA-MP 0.3b - by royal_king[xXx] - 19.09.2010, 10:49
Re: Simple anti drive by for SA-MP 0.3b - by Retardedwolf - 19.09.2010, 10:54
Re : Simple anti drive by for SA-MP 0.3b - by spiirou - 19.09.2010, 13:56
Re: Re : Simple anti drive by for SA-MP 0.3b - by Retardedwolf - 19.09.2010, 22:15
Re: Simple anti drive by for SA-MP 0.3b - by wups - 20.09.2010, 19:50

Forum Jump:


Users browsing this thread: 6 Guest(s)