help with this cmd
#1

lol, i tryed to make dcmd_admins but it only shows the
name to who typed admin and it sends the message to all
why?
Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
    new string[128], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PInfo[i][Level] > 1)
        {
            format(string, sizeof string, "(%i)%s/n/",i, pName);
            SendClientMessage(i,LGREEN, string);
        }
    }
    return 1;
}
Reply
#2

Seriously? Look at your code again...

pawn Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
    new string[128], name[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PInfo[i][Level] > 1)
        {
            GetPlayerName(i, name, sizeof(name));
            format(string, sizeof(string), "%s Level: %d", name, PInfo[i][Level]);
            SendClientMessage(playerid, LGREEN, string);
        }
    }
    return 1;
}
That should do the trick. Nothing advanced...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)