06.03.2013, 16:11
hey all,
i was busy with my trunk system, when i found this small bugg, and i dont really understand what's wrong in this stock...
when i do for example RemovePlayerWeapon(playerid, 22); then it DOES remove the weapon from the player, but when i want to scroll through the weapons, it doesnt works... it keeps going back to the fist...
anybody knows what is wrong with this code?
greets
i was busy with my trunk system, when i found this small bugg, and i dont really understand what's wrong in this stock...
pawn Код:
stock RemovePlayerWeapon(playerid, pweaponid)
{
new plyWeapons[12];
new plyAmmo[12];
for(new slot = 0; slot != 12; slot++)
{
new pwep, pammo;
GetPlayerWeaponData(playerid, slot, pwep, pammo);
if(pwep != pweaponid)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
}
}
ResetPlayerWeapons(playerid);
for(new slot = 0; slot != 12; slot++)
{
GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
}
anybody knows what is wrong with this code?
greets