Weapon not saving
#4

When you give a player a weapon, you need to do this:


pawn Код:
PlayerInfo[playerid][GetWeaponSlot(weapon)] = weapon;
INI_WriteInt(File,"Weapons", PlayerInfo[playerid][GetWeaponSlot(weapon)]);
pawn Код:
GetWeaponSlot(weaponid)
{
    switch(weaponid)
    {
        case 0, 1:
        {
            return 0;
        }
        case 2, 3, 4, 5, 6, 7, 8, 9:
        {
            return 1;
        }
        case 22, 23, 24:
        {
            return 2;
        }
        case 25, 26, 27:
        {
            return 3;
        }
        case 28, 29, 32:
        {
            return 4;
        }
        case 30, 31:
        {
            return 5;
        }
        case 33, 34:
        {
            return 6;
        }
        case 35, 36, 37, 38:
        {
            return 7;
        }
        case 16, 17, 18, 39, 40:
        {
            return 8;
        }
        case 41, 42, 43:
        {
            return 9;
        }
        case 10, 11, 12, 13, 14, 15:
        {
            return 10;
        }
        case 44, 45, 46:
        {
            return 11;
        }
    }
    return -1;
}
Let me know if that works, Sorry for delayed reply.
Reply


Messages In This Thread
Weapon not saving - by AndySedeyn - 09.04.2014, 09:18
Re: Weapon not saving - by Dokins - 09.04.2014, 10:06
Re: Weapon not saving - by AndySedeyn - 09.04.2014, 10:11
Re: Weapon not saving - by Dokins - 09.04.2014, 10:36
Re: Weapon not saving - by AndySedeyn - 09.04.2014, 11:16
Re: Weapon not saving - by xVIP3Rx - 09.04.2014, 11:28
Re: Weapon not saving - by Dokins - 09.04.2014, 11:39
Re: Weapon not saving - by AndySedeyn - 09.04.2014, 12:09

Forum Jump:


Users browsing this thread: 1 Guest(s)