Command help
#5

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
Ok but the "Rank1" should not be static, since the admin has to choose WHICH rank to edit (Rank1, Rank2 etc).

How?
Use "format" function to format the rank id like: "Rank%i" with the rank id but you should normalize (iirc that's the correct word) your table. I mean, you should have not Rank1, Rank2, Rank3, ... but something like that:
- SQLID
- Rank id
- Faction id
- Rank's name
In your gamemode, create a 3D (and also a 4D implicit one because of the rank's name) array: ArrayName[factionid][rankid][enum]
Example:

It's a bit more tricky but it allows you to do many ranks as you want.
Reply


Messages In This Thread
Command help - by KinderClans - 27.09.2018, 11:04
Re: Command help - by Dayrion - 27.09.2018, 11:17
Re: Command help - by KinderClans - 27.09.2018, 12:55
Re: Command help - by AlfaSufaIndo - 27.09.2018, 12:59
Re: Command help - by Dayrion - 27.09.2018, 13:07

Forum Jump:


Users browsing this thread: 1 Guest(s)