Anit -DB bagged
#1

Okay. here i made a anti db only for 1 weapon, M5.

I did so when a player enter to any vehicle as driver his weapon ammo will go to 0 (-30 ingame)

So when player exit from vehicle he loses he's weapon. I want to get the player weapon back and he's ammo too.


pawn Код:
new WeaponId;
    new ammo;

    if((newstate == PLAYER_STATE_DRIVER))
    {
        for(new i=0;i<11;i++)
    {
           if(GetPlayerWeapon(playerid) == 29)
           {
              GetPlayerWeaponData(playerid, i, WeaponId, ammo);
              SetPlayerAmmo(playerid, 29, 0);
           }
        }
    }
    if((newstate == PLAYER_STATE_ONFOOT) && ((oldstate == PLAYER_STATE_DRIVER)))
    {
        GivePlayerWeapon(playerid,29, ammo);
    }
   return 1;
}
How to give him the weapon back with ammo that he had before incar?


How to use Use GetPlayerWeaponData ? Make it for me
Reply


Messages In This Thread
Anti Drive-By bagged - by Cypress - 04.09.2010, 15:46
Re: Anit -DB bagged - by LarzI - 04.09.2010, 15:49
Re: Anit -DB bagged - by Cypress - 04.09.2010, 15:53
Re: Anit -DB bagged - by LarzI - 04.09.2010, 16:07
Re: Anit -DB bagged - by Cypress - 04.09.2010, 16:09
Re: Anit -DB bagged - by General Abe - 04.09.2010, 17:22
Re: Anit -DB bagged - by Cypress - 04.09.2010, 21:40
Re: Anit -DB bagged - by General Abe - 05.09.2010, 00:58
Re: Anit -DB bagged - by Cypress - 05.09.2010, 07:45
Re: Anit -DB bagged - by Calgon - 05.09.2010, 07:59

Forum Jump:


Users browsing this thread: 1 Guest(s)