Quote:
Originally Posted by [MG]Dimi
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/bringall", cmdtext, true))
{
new Float:Pos[3],pName[24],string[128];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
GetPlayerName(playerid,pName,sizeof(pName));
format(string,128,"%s(%d) has brought everyone to his position!",pName,playerid);
SendClientMessageToAll(0xFF0000FF,string);
for(new i=0;i<MAX_PLAYERS;i++)
if(IsPlayerConnected(playerid))
{
SetPlayerPos(i,Pos[0],Pos[1],Pos[2]);
return 1;
}
return 1;
}
return 0;
}
|
That will fail since as soon as it sets one players position it will return out of the function
remove the return from the loop.