[HELP]: Reseting weapons
#8

Quote:
Originally Posted by Konstantinos
View Post
I'm not sure about that. If you have a deagle with 500 ammo and you give 0, you should still have 500 ammo.

Anyways, I'd save the weapons/ammo in an array with GetPlayerWeaponData and if the weaponid existed, I'd reset the weapons and give them back except the weaponid you chose (note that you should know the slot of the weapon).
Just realized that LoL, How dumb Am I? I was thinking that GivePlayerWeapon works the same as SetPlayerHealth, SetPlayerMoney & SetPlayerArmour, oh-well Areax Konstantinos means something like this, I didn't test it but atleast give it a try

pawn Code:
stock RemovePlayerWeaponID(playerid, weaponid)
{
    new
        ArrayWeapons[12], ArrayAmmunations[12], Weapon, Ammunation;

    for(new slot = 0; slot != 12; slot++) {
        GetPlayerWeaponData(playerid, slot, Weapon, Ammunation);
        if(Weapon != weaponid) {
            GetPlayerWeaponData(playerid, slot, ArrayWeapons[slot], ArrayAmmunations[slot]);
        }
    }

    for(new slot = 0; slot != 12; slot++) {
        GivePlayerWeapon(playerid, ArrayWeapons[slot], 300);
    }

    ResetPlayerWeapons(playerid);
}
Reply


Messages In This Thread
[HELP]: Reseting weapons - by Areax - 23.11.2013, 14:53
Re: [HELP]: Reseting weapons - by knackworst - 23.11.2013, 14:55
Re: [HELP]: Reseting weapons - by Patrick - 23.11.2013, 14:57
Re: [HELP]: Reseting weapons - by Areax - 23.11.2013, 14:57
Re: [HELP]: Reseting weapons - by Areax - 23.11.2013, 15:02
Re: [HELP]: Reseting weapons - by Konstantinos - 23.11.2013, 15:07
Re: [HELP]: Reseting weapons - by Areax - 23.11.2013, 15:09
Re: [HELP]: Reseting weapons - by Patrick - 23.11.2013, 15:21
Re: [HELP]: Reseting weapons - by Konstantinos - 23.11.2013, 15:35
Re: [HELP]: Reseting weapons - by Areax - 23.11.2013, 15:48

Forum Jump:


Users browsing this thread: 1 Guest(s)