18.11.2018, 14:31
Well, I did not give the best example.
But thanks for the example of the cycle, use it in this form (subtract in the space for the condition) I did not think. But it makes sense and it's elegant. I will definitely use it in the future
So if I understand correctly. Can not get index in array?
Another example:
I have a list of settings, and it is maintained in alphabetical order. When I add a line, so abediently.
But thanks for the example of the cycle, use it in this form (subtract in the space for the condition) I did not think. But it makes sense and it's elegant. I will definitely use it in the future
So if I understand correctly. Can not get index in array?
Another example:
I have a list of settings, and it is maintained in alphabetical order. When I add a line, so abediently.
Код:
new Settings[][] = { "Gravity", "Max money in pocket", /* i want add: "Max weapon ammo" */ "Time", "Weather",//index is 4. Bud when i add line index is will be 5 }; new SettingValue[sizeof(Settings)];//integer value for setting (for Weather for example id 16 (rain)) prikaz:getsettime(playerid,params[]) { new index = ??; new string[144]; format(string,sizeof(string),"%s is set to %d",Settings[index],SettingValue[index]); SendClientMessage(playerid,0xFFFFFFFF,string); return 1; }