Dropping one weapon
#4

Sup,

Try this:

pawn Код:
stock RemovePlayerWeapon(playerid, weaponid) {
    new Weapons[12], Ammo[12];
    for(new slot=0; slot !=12;++slot) {
        new weapon, ammo;
        GetPlayerWeaponData(playerid, slot, weapon, ammo);
        if(weapon !=weaponid && ammo !=0) {
            GetPlayerWeaponData(playerid, slot, Weapons[slot], Ammo[slot]);
        }
    }
    ResetPlayerWeapons(playerid);
    for(new slot =0; slot !=12;++slot) {
        if(Ammo[slot] != 0) {
        GivePlayerWeapon(playerid, Weapons[slot], Ammo[slot]);
    }
    return 1;
}
Reply


Messages In This Thread
Dropping one weapon - by cloudysky - 17.07.2011, 22:04
Re: Dropping one weapon - by PrawkC - 17.07.2011, 22:16
Re: Dropping one weapon - by cloudysky - 17.07.2011, 22:23
Re: Dropping one weapon - by Emmet Shawn - 17.07.2011, 22:24

Forum Jump:


Users browsing this thread: 3 Guest(s)