Question

Если писать просто команду /a, то выдаёт /a [текст]
А если написать какой-то текст то ничего не просиходит
Код:
 

stock SendAdminMessage(color, text[])
{
    foreach(new i: Player)
    {
        if(PI[i][data_CADMIN] != 1||PI[i][data_ADMLVL] >= 1)
        {
             SendClientMessage(i, color, text);
        }
    }
    return 1;
}


Команда:

CMD:a(playerid, params[])
{
    if(PI[playerid][data_ADMLVL] > 1)
    {
        new text[90];
        if(sscanf(params, "s[90]", text))
            return SendClientMessage(playerid, CG, "Используйте /a [текст]");
        if(antiflood[playerid] > 0
            return SendClientMessage(playerid, COLOR_BLACK,"Пожалуйста, подождите пару секунд...");
        antiflood[playerid]++;
        if(PI[playerid][data_LOGGED] == false
            return SendClientMessage(playerid, CG, "Вы не авторизированы. Пожалуйста авторизируйтесь.");
        new string[19 + (20 + (-2) + 1 + (-2)) + (MAX_PLAYER_NAME + (-2) + 3 + (-2)) + 90];
        format(string, sizeof(string), "[%s #%i] %s[%i]: %s", GSName[PI[playerid][data_ADMLVL]], PI[playerid][ADMINSNUMBER], PI[playerid][data_NAME], playerid, text);
        return SendAdminMessage(COLOR_BLUE, string);
    }
    return 1;   
}

 

Share this post


Link to post

0 answers to this question

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • MetaLife Online
      By MetaLife Online
      Привествую! писал код. проверил работу, в БД отправилось информация криво 
      потом добавил к P_NICK[MAX_PLAYER_NAME] для того чтобы все было окей. Но после этого данные вообще не отпровляються и не показываеться %s. пару раз удалял и не помогло не чего 
      enum PLAYER_INFO {     P_ID,     P_NICK[MAX_PLAYER_NAME],     P_PASS,     P_GENDER,     P_SKIN,     P_LVL, };