16.06.2016, 09:09
Hi all!
I have an array with the user IDs, with a function a must toggle all the players in this array to "controllable" with "TogglePlayerControllable"
I'm not able to convert the following for loop to a foreach loop using the standalone foreach or the y_less/iterate.
RunData[sRun][RunnersCount] is an integer
RunData[sRun][Runners] is an array
Can someone help me?
Regards
I have an array with the user IDs, with a function a must toggle all the players in this array to "controllable" with "TogglePlayerControllable"
I'm not able to convert the following for loop to a foreach loop using the standalone foreach or the y_less/iterate.
RunData[sRun][RunnersCount] is an integer
RunData[sRun][Runners] is an array
Code:
for(new sP = 1; sP <= RunData[sRun][RunnersCount]; sP++) { TogglePlayerControllable(RunData[sRun][Runners][sP], 1); }
Regards