Reading Cmds Problem.
#2

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;
}
Reply


Messages In This Thread
Reading Cmds Problem. - by FedEx - 30.06.2014, 10:35
Re: Reading Cmds Problem. - by Twizted - 30.06.2014, 21:21

Forum Jump:


Users browsing this thread: 1 Guest(s)