Posts: 534
Threads: 265
Joined: Jul 2014
Hi,
Player can use command where i do foreach cikle, it'is can harm server if player spam command?
Posts: 256
Threads: 1
Joined: Aug 2014
Reputation:
0
Not really, a foreach loop takes around 20 ms to complete. This means you can run 50 foreach loops per second without any problems. You should add some kind of anti-spam though, it's useful not only to protect server resources, but also to deny any kind of spam towards a player (maybe you have commands that send messages to players).