Am I doing this right?
#1

pawn Код:
new
        weapons[13][2] //Creating the variable for the data.
    ;

    for (new i = 0; i < 13; i++)
    {
        GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]); //Getting the data.
        UserInfo[playerid][w_Slot1] = weapons[1][0]; //Trying to update Weapon Slot 1's Weapon ID.
        UserInfo[playerid][w_Slot1A] = weapons[1][1]; // Trying to update Weapon Slot 1's Ammo count.
    }
I'm honestly not sure, and I'm not at a PC where I can test at the moment, so I'd like to know - am I doing this right?
Reply
#2

Take the assignation of "UserInfo[playerid][...]" (both) out of the loop - and put them below. There's no point in doing the same thing 13 times

Other than that, that'll be fine.
Reply
#3

Quote:
Originally Posted by funky1234
Посмотреть сообщение
Take the assignation of "UserInfo[playerid][...]" (both) out of the loop - and put them below. There's no point in doing the same thing 13 times

Other than that, that'll be fine.
Oh jeez, it must've slipped my mind. Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)