i need help with /admins!
#10

EDIT:

Quote:
Originally Posted by arakuta
Посмотреть сообщение
This is the correct way to use a function.

pawn Код:
SendClientMessage(i,COLOR_GREEN, string);
You did this:

pawn Код:
SendClientMessage, COLOR_GREEN, string);
Quote:
Originally Posted by Stanford
Посмотреть сообщение
The string should be something like this:-
(according to your getplayername)

pawn Код:
format(string, 128, "Online Admins: %s", sendername);
Exactly what arakuta and Standford said.

Fixed code:
pawn Код:
CMD:admins(playerid, params[])
{
    new sendername[MAX_PLAYER_NAME],string[64 + MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerAdmin(i))
            {
                GetPlayerName(i, sendername, sizeof(sendername));
                format(string, 100, "Online Admins: %s", sendername);
                SendClientMessage(playerid, COLOR_GREEN, string);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
i need help with /admins! - by JackieJ - 09.04.2014, 18:24
Re: i need help with /admins! - by arakuta - 09.04.2014, 18:29
Re: i need help with /admins! - by JackieJ - 09.04.2014, 18:30
Re: i need help with /admins! - by Stanford - 09.04.2014, 18:32
Re: i need help with /admins! - by JackieJ - 09.04.2014, 18:33
Re: i need help with /admins! - by Bingo - 09.04.2014, 18:34
Re: i need help with /admins! - by JackieJ - 09.04.2014, 18:35
Re: i need help with /admins! - by Dignity - 09.04.2014, 18:37
Re: i need help with /admins! - by JackieJ - 09.04.2014, 18:39
Re: i need help with /admins! - by Dignity - 09.04.2014, 18:43

Forum Jump:


Users browsing this thread: 1 Guest(s)