Re: foreach 0.4.1 standalone include -
ZiGGi - 15.09.2016
Quote:
Originally Posted by Crayder
Why would you remove NPC support? You added Actor support, but removed one of the main iterators. I use both, the "Character" and "Bot" iterators, so I'm not exactly a fan of this change...
|
You don't understand. I have removed NPC
script support, this scripts located in npcmodes/ folder. Because I don't need this.
Quote:
Originally Posted by Konstantinos
About the Vehicle iterator: it is for local vehicles, each script has each own vehicles not global (from all scripts).
If you could add both options would be nice.
|
I can fix it, will be soon.
Re: foreach 0.4.1 standalone include -
Crayder - 15.09.2016
Quote:
Originally Posted by ZiGGi
You don't understand. I have removed NPC script support, this scripts located in npcmodes/ folder. Because I don't need this.
|
Yeah, I noticed. I was on my phone when I said that before.
However... You removed the YSI communication. So now if someone uses YSI they will corrupt each other.
Re: foreach 0.4.1 standalone include -
ZiGGi - 15.09.2016
Quote:
Originally Posted by Crayder
However... You removed the YSI communication. So now if someone uses YSI they will corrupt each other.
|
Who uses YSI shouldn't use that.
Btw,
fork are updated, multiscripts now supported by FOREACH_MULTISCRIPT define.
Re: foreach 0.4.1 standalone include -
KokyZ - 10.11.2016
Thnx for ur great include but i have one question
foreach function may be used as foreach(Player : i); only or i may use something like foreach(MAX_BANKS : i);
Re: foreach 0.4.1 standalone include -
Konstantinos - 10.11.2016
Quote:
Originally Posted by KokyZ
Thnx for ur great include but i have one question
foreach function may be used as foreach(Player : i); only or i may use something like foreach(MAX_BANKS : i);
|
Neither of them. The old (deprecated) syntax which you shouldn't use is somewhat similar to what you posted but the separator is different:
Код:
// DO NOT USE
foreach(Player, i)
The syntax you should be using is:
pawn Код:
// foreach(iterator_variable : iterator_name)
foreach(new i : Player)
It expects the name of the iterator and not a constant (assuming
MAX_BANKS is one).
Quote:
Originally Posted by ZiGGi
I can fix it, will be soon.
|
Thanks. Adding the feature for optimized multi-iterators would be great as well.
Re: foreach 0.4.1 standalone include -
KokyZ - 10.11.2016
EDIt: sorry posted by wrong iam so sorry
Respuesta: foreach 0.4.1 standalone include -
iSanchez - 18.03.2017
I have a problem with this include.
when I'm using foreach(new playerid : Player) it doesn't include the player id 0.
Why?
I mean, it start counting from 1+..
Re: Respuesta: foreach 0.4.1 standalone include -
ISmokezU - 18.03.2017
Quote:
Originally Posted by iSanchez
I have a problem with this include.
when I'm using foreach(new playerid : Player) it doesn't include the player id 0.
Why?
I mean, it start counting from 1+..
|
Show some more code. Try it like this maybe,
Код:
foreach(new i : Player)
.
Re: Respuesta: foreach 0.4.1 standalone include -
Crayder - 19.03.2017
Quote:
Originally Posted by iSanchez
I have a problem with this include.
when I'm using foreach(new playerid : Player) it doesn't include the player id 0.
Why?
I mean, it start counting from 1+..
|
It's starts from the lowest playerid and goes through each other playerid. It's not like a foreach loop that loops through a range.
Re: foreach 0.4.1 standalone include -
Gammix - 24.06.2017
Hey, is there way to access indexes of a foreach loop.
Lets say my iterator consists following elements:
PHP код:
5, 24, 53, 2, 76, 31, 45, 92, 40, 10
// total elements = 10
Now i want the loop to start from 76 (i.e. 4th index), but is there any way other than using "continue" inside the loop?
Re: foreach 0.4.1 standalone include -
Unrea1 - 27.08.2017
Add support for vehicles, good job.
Re: foreach 0.4.1 standalone include -
Kar - 02.10.2017
Update your foreach include.
https://github.com/karimcambridge/SAMP-foreach/releases