Why is this happening ?
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You forgot to close the if statement. It should be:
pawn Код:
if(PlayerINFO[i][AdminLevel] >=1) {
Also using "s" specifier without a length will give a warning to the console. But since it's not necessary to use sscanf when there is only 1 parameter and that's string, you can just do:
pawn Код:
CMD:admin(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, -1, "Usage /admin [question]");
    new Message[144], sName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sName, sizeof(sName));
    format(Message, sizeof(Message), "QUESTION from %s: %s", sName, params);
    for(new i; i < MAX_PLAYERS; i++){
        if(PlayerINFO[i][AdminLevel] >= 1) {
            SendClientMessage(i, -1, Message);
        }
    }
    return 1;
}
Thanks , rep+ . Are you greek ?
Reply


Messages In This Thread
Why is this happening ? - by Johnson_Brooks - 08.05.2014, 10:43
Re: Why is this happening ? - by Ada32 - 08.05.2014, 10:47
Re: Why is this happening ? - by Konstantinos - 08.05.2014, 10:48
Re: Why is this happening ? - by Johnson_Brooks - 08.05.2014, 11:07

Forum Jump:


Users browsing this thread: 1 Guest(s)