SA-MP Forums Archive
Multiple Enum Instances Per Player - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Multiple Enum Instances Per Player (/showthread.php?tid=609006)



Multiple Enum Instances Per Player - Jonesy96 - 07.06.2016

Hi,

So say I want to create bank accounts for every player. But maybe I want multiple bank accounts. I have an enum:

Код:
enum pBankAccount{   //bank account enum
	id,
	character_id,
	account_no,
	cash
}
new BankAccount[MAX_PLAYERS][pBankAccount];
If I wanted each player to have multiple bank accounts loaded, so I could access them as such:

Код:
BankAccount[playerid][BankAccountId][cash];
How would I go about doing this in the set up of the enum? Not sure if ive explained that very well, but any help you can give Id appreciate.

Thanks


Re: Multiple Enum Instances Per Player - PrO.GameR - 07.06.2016

new BankAccount[MAX_PLAYERS][MULTIPLE!][pBankAccount];


Re: Multiple Enum Instances Per Player - Jonesy96 - 07.06.2016

Hi all,

Yeah after I posted this, I was looking at it and did exactly as you said. Then came back here to see you'd suggested it...bit of a dull moment from myself haha. None the less, thanks for the help/