16.01.2010, 11:28
Can somebody please tell me if this piece of code will work? Because I ain't sure and don't have time to test it and I ain't so good in scripting. I wanted that the server checks if 2 or more players are in some area and if there are, do something.... If 0 or 1 player is in area it suppose to do nothing. Here is what I got.
Код:
new count = 0; for(new i=0; i<=MAXPLAYERS; i++) { if(IsPlayerConnected(i)) count++; if((IsPlayerInArea(bla, bla, bla, bla) && ((count) >= 2)); { //Do something if at least 2 players are in area... return 1; } }