Ban all CTs in a loop
Hello.
How can I "ban" all CTs by their IPs using a loop? And of course with the opposite team, Terrorists. |
Re: Ban all CTs in a loop
PHP Code:
|
Re: Ban all CTs in a loop
I don't understand why everybody use continues and returns instead of making the code to be read like what it does:
PHP Code:
|
Re: Ban all CTs in a loop
To avoid the damn brackets xD and also if the code in the loop is big and I just want suddenly to add a check to the whole code, like if the user is alive or something
tell me one good reason why I shouldn't use return and continue instead of brackets and I'll understand :) |
Re: Ban all CTs in a loop
Quote:
|
Re: Ban all CTs in a loop
If I want to do one action with that loop, then I use continue.
If I want to do 2 different actions that depend on something about the individual index of the loop, then I use if() and else[ if](). |
Re: Ban all CTs in a loop
Quote:
Still, I like the code to be in a row... not too far off pushed to the right, if I do an if() with brackets on everything I get to have 5-10 open brackets (again, generaly speaking, not this code, this is small but I'm used to use continue and return, I also do this in php :P) I use continue whenever I need to skip everything else... if I need to choose between two or more things I use if(), else if(), switch() etc... |
Re: Ban all CTs in a loop
PHP Code:
PHP Code:
__ And i don't know why do you want to avoid braces. Braces make that different code blocks look like different code blocks. |
Re: Ban all CTs in a loop
Is there a way to ban an amount of random players from a team?
|
Re: Ban all CTs in a loop
Quote:
Quote:
|
| All times are GMT -4. The time now is 01:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.