UserData - enum
playerid - the player that is getting the value
Guns - the field you want to store the variable
Guns (Array) - Holds the value for each gun (weapon)
GetWeaponSlot - Getting the weapon slot of the weapon id stored in WeaponList[GunNum][WID]
= - Telling the player's variable to store the following into it.
WeaponList[GunNum][WID] - The weapon id to store in the Gun Array in that weapons slot.
So with that above, marked:
UserData[playerid][Guns][GetWeaponSlot(WeaponList[GunNum][WID])] = WeaponList[GunNum][WID];
enum-----playerid---Guns-----Guns(Array)----GetWeaponSlot----Weapon id-----Weapon ID to store
(Forums don't like spaces)
PHP код:
UserData[playerid][Guns][GetWeaponSlot(WeaponList[GunNum][WID])] = WeaponList[GunNum][WID];
UserData[playerid][Guns][GetWeaponSlot(WeaponList[GunNum][WID])]
//This is getting the value of
WeaponList[GunNum][WID]
So pretty much, you're saving the weapon id into the player's enumerator data, by the weapon slot, the slot id will hold the weapon id.