[SOLVED] The command doesn't give everyone a point!
#3

You exited in your for loop, meaning you only did player 0 then exited.

You also tried to send a client message to all players, for every player in the loop.


pawn Code:
dcmd_pointall(playerid,params[])
{
    #pragma unused params
    if(AccData[playerid][Level]>=4)
    {
        new po[MAX_PLAYER_NAME+45];
        format(po,sizeof(po),"* Admin %s (ID:%d) gave everyone a point!",PlayerName(playerid),playerid);
        SendClientMessageToAll(COLOR_LIGHTGREEN,po);
        GameTextForAll("~g~Free points~n~for everyone!",3000,5);
        for(new x=0; x<MAX_PLAYERS; x++)
        {
            Points[x]++;   
        }

    }
    return 1;
}
Reply


Messages In This Thread
[SOLVED] The command doesn't give everyone a point! - by XRVX - 16.04.2010, 23:49
Re: The command doesn't give everyone a point! - by AK47317 - 17.04.2010, 02:01
Re: The command doesn't give everyone a point! - by mansonh - 17.04.2010, 02:22

Forum Jump:


Users browsing this thread: 2 Guest(s)