08.04.2017, 12:01
Quote:
Yea, they are pretty much like tags internally.
You can still keep the name of the enum, but you will have to do: Код:
if(dialogid == _:pcpSettings) But this can also be very useful if you want to make toggleable dialogs. You'd just have to create an array with that enum and could do Код:
DialogEnabled[pcpSettings] = 1; Код:
if(!DialogEnabled[dialogids:dialogid]) return 1; After all it would probably be easier to do it without the enum name, but it's possible. Dialogs are also a bad example here. |
I have been using enums that way for a private vehicle system, and it's pretty useful to know when you're looping through an enum to see if the car-slots are used or not.
Thanks for the explanation and effort you put into it