how can i check does array field was already set
Hello.
I'm creating a menu which player can disable. Player settings are being stored in multi-dimensional Code:
I want the plugin to recognize empty var as 1 Now I'm checking it using function below. Code:
How should I check it so its will return correct value ? Regards. |
Re: how can i check does array field was already set
I don't understand why you're using an 'enum()' for that.
new g_players[33]; is sufficient. And if you want to fill with 1 by default, just do that: new g_players[33] = { 1, ... }; |
Re: how can i check does array field was already set
Quote:
enum E_PLAYER { menu_on = 1, rifle_page = 2 } I need to store somehow pagination info about current menu page thats why I'm using enum its not that I'm only storing one info in that array. Please tell me how can do thing I have written in first post. edit> besides I think using enum makes code more clean and understandable edit>> And on more thing I know how to set default value for a var but do you know how to set default var for all players in that array, with enum of course ? |
| All times are GMT -4. The time now is 11:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.