This is giving me the same weapon 12 times.
#1

pawn Код:
for(new w = 0; w < 13; w++)
                {
                        new id = PlayerWeapons[playerid][w];
                        printf("WeaponID: %d", id);
                        if(WepAmmo[id] > 0)
                        {
                            GivePlayerWeapon(playerid,WepModel[id],WepAmmo[id]);
                            printf("Weapon: %d, Ammo: %d", WepModel[id], WepAmmo[id]);
                        }

                }

The PlayerWeapons[playerid][w] is the WeaponSQLID.

It's already loaded into this variable.

PlayerWeapons[playerid][13] is the amount.

I want it to give the weapon and ammo once, but it gives 12 times.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)