RemovePlayerArmedWeapon?
#6

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
That would indeed just set them to hold fists.


You can always just loop through all the weapon data, remove all the weapons, and give all the weapons excluding the desired weapon
You could also just do this

pawn Код:
stock RemoveWeapon(playerid, weaponid) SetPlayerAmmo(playerid, weaponid, 0);
EDIT: If it says that function doesn't exist (read on ****** it does...but i see it on wiki) you can add this

pawn Код:
stock SetPlayerAmmo(playerid, weaponid, ammo)
{
    new weapon[13][2];
    for(new i=0; i < 13; i++)
    {
        GetPlayerWeaponData(playerid, i, weapon[i][0], weapon[i][1]);
        if(weapon[i][0] == weaponid)
        {
            GivePlayerWeapon(playerid, weaponid, -(weapon[i][1]*2));
            break;
        }
    }
    GivePlayerWeapon(playerid, weaponid, ammo);
    return 1;
}
Reply


Messages In This Thread
RemovePlayerArmedWeapon? - by Mento - 12.05.2012, 03:48
Re: RemovePlayerArmedWeapon? - by zSuYaNw - 12.05.2012, 06:09
Re: RemovePlayerArmedWeapon? - by Ballu Miaa - 12.05.2012, 06:20
Re: RemovePlayerArmedWeapon? - by Jonny5 - 12.05.2012, 07:09
Re: RemovePlayerArmedWeapon? - by ReneG - 12.05.2012, 07:20
Re: RemovePlayerArmedWeapon? - by [ABK]Antonio - 12.05.2012, 07:24
Re: RemovePlayerArmedWeapon? - by Ballu Miaa - 12.05.2012, 17:28
Re: RemovePlayerArmedWeapon? - by Abreezy - 12.05.2012, 17:36
Re: RemovePlayerArmedWeapon? - by Mento - 12.05.2012, 19:19

Forum Jump:


Users browsing this thread: 3 Guest(s)