Explain to me line I do not understand PLS
#3

Quote:
Originally Posted by Banana_Ghost
Посмотреть сообщение
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.
thank you so much man!!
Reply


Messages In This Thread
Explain to me line I do not understand PLS - by noamch1997 - 13.07.2015, 06:30
Re: Explain to me line I do not understand PLS - by Banana_Ghost - 13.07.2015, 07:10
Re: Explain to me line I do not understand PLS - by noamch1997 - 14.07.2015, 02:11

Forum Jump:


Users browsing this thread: 1 Guest(s)