30.06.2014, 21:21
That's not how a loop works. You might want to try the following and see if it works. Pay attention to the comments.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new idx;
new i;
new playername[MAX_PLAYER_NAME];
string = strtok(cmdtext, idx);
if(ServerInfo[ReadCmds] == 1)
{
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "*** %s (%d) typed: %s", playername,playerid,cmdtext);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) //then do what?
if( (PlayerInfo[i][Level] > PlayerInfo[playerid][Level]) && (PlayerInfo[i][Level] > 1) && (i != playerid) ) //then do what?
IRC_GroupSay(gGroupID3, IRC_MCHANNEL, string);
SendClientMessage(i, grey, string);
return 1;
}
return 1;
}