Weapons aren't loading correctly.
#2

The else clause is executed only for last p11 gun slot.
I'd suggest changing pGun1, pGun2 to pGun[11], so then you can use

pawn Код:
GivePlayerWeapons(playerid)
{
    new bool:def = true;
    for(new i = 0; i != 11; ++i) {
        if(PlayerInfo[playerid][pGun][i]) {
            GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun][i], PlayerInfo[playerid][pGunAmmo][i]);
            def = false;
        }
    }
    if(def) {
        GivePlayerWeapon(playerid, 24, 160); GivePlayerWeapon(playerid, 26, 84); GivePlayerWeapon(playerid, 28, 370);
    }
}
Reply


Messages In This Thread
Weapons aren't loading correctly. - by Isolated - 11.07.2013, 17:56
Re: Weapons aren't loading correctly. - by Misiur - 11.07.2013, 18:56
Re: Weapons aren't loading correctly. - by Isolated - 11.07.2013, 22:49
Re: Weapons aren't loading correctly. - by ToiletDuck - 12.07.2013, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)