Question

Не работает команда, подскажите где ошибки

Спойлер

CMD:givedg(playerid, params[])
{

    if(!strcmp(GetPlayerNameEx(playerid)|| !strcmp(GetPlayerNameEx(playerid), fd, true))
    {
        extract params -> new to_player, cash; else return SendClientMessage(playerid, COLOR_GOLD, "Используйте:{"#cW"} /givedg [ID игрока] [cумма]");

        if(!IsPlayerConnected(to_player) || !IsPlayerLogged(to_player))
            return SendClientMessage(playerid, 0xFF6600FF, "Такого игрока нет");

        if(!(1 <= cash <= 1_000_000_000)) return SendClientMessage(playerid, 0xFF6600FF, "Количесто денег от 1 до 1.000.000.000 рублей");

        new reason[144];
        format(reason, sizeof reason, "Выдача от адм %s", GetPlayerNameEx(playerid));
        GivePlayerMoneyEx(to_player, cash, reason, true, true);

        format(reason, sizeof reason, "Вы победили в промо-акции и выиграли %d рублей!", cash);
        SendClientMessage(to_player, 0x66CC00FF, reason);

        format(reason, sizeof reason, "Вы подарили игроку %s %d рублей", GetPlayerNameEx(to_player), cash);
        SendClientMessage(playerid, 0x66CC00FF, reason);

        format(reason, sizeof reason, "Выдал %s[acc:%d] %d руб", GetPlayerNameEx(to_player), GetPlayerAccountID(to_player), cash);
        SendLog(playerid, LOG_TYPE_SUPERADMIN_ACTION, reason);
    }

    return 1;
}

 

 

Edited by keyl

Заметка от keyl , создано

3.2. Код больше 10 строк необходимо брать в теги "Код" и "Спойлер". Как это сделать рассказано в разделе "FAQ".

Устное предупреждение.

Share this post


Link to post

1 answer to this question

  • 0

что вы вложили в понятие "Не работает"? 

Share this post


Link to post
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

    • Kutuzov
      By Kutuzov
      Всем привет, хотелось бы спросить у тех, кто разбирается в PluginSDK.
      Какие есть источники, руководства, документации о PluginSDK?
      Я пока что ничего нормального не нахожу.
      Заранее спасибо