Аслан*
Ученик
Правильно ли я перевел обычную команду на zcmd?
Команда в обычном виде.
Команда на ZCMD.
Команда в обычном виде.
Код:
if (strcmp(cmd, "/btake", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_YELLOW, " Вы должны находиться в автомобиле!");
return 1;
}
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, COLOR_GREY, " Вы должны находиться за рулём транспортного средства!");
return 1;
}
if(carboot[bcarid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Вы должны открыть багажник!");
return 1;
}
if(model!=448 && model!=461 && model!=462 && model!=463 && model!=468 && model!=471 && model!=481 && model!=509 && model!=510 && model!=521 && model!=522 && model!=523 && model!=581 && model!=586 && model!=481 && model!=509 && model!=510)
{
ShowPlayerDialog(playerid,DIALOG_BTAKE,DIALOG_STYLE_LIST,"Багажник","Оружие(Слот:1)\nОружие(Слот:2)\nОружие(Слот:3)\nОружие(Слот:4)\nОружие(Слот:5)\nОружие(Слот:6)\nНаркотики(Слот:1)\nНаркотики(Слот:2)\nНаркотики(Слот:3)", "Забрать", "Закрыть");
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, " В этом транспорте нет багажника!");
}
}
return 1;
}
Команда на ZCMD.
Код:
CMD:skin(playerid, params[])
{
if(!IsPlayerConnected(playerid)) return true;
{
if(!IsPlayerInAnyVehicle(playerid)) return true;
if(params[0] == playerid) return SendClientMessage(playerid, COLOR_YELLOW, " Вы должны находиться в автомобиле!");
return true;
}
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return true;
{
if(params[0] == playerid) return SendClientMessage(playerid, COLOR_GREY, " Вы должны находиться за рулём транспортного средства!");
return true;
}
if(carboot[bcarid] == 0) return true;
{
if(params[0] == playerid) return SendClientMessage(playerid, COLOR_GREY, " Вы должны открыть багажник!");
return true;
}
if(model!=448 && model!=461 && model!=462 && model!=463 && model!=468 && model!=471 && model!=481 && model!=509 && model!=510 && model!=521 && model!=522 && model!=523 && model!=581 && model!=586 && model!=481 && model!=509 && model!=510) return true;
{
return ShowPlayerDialog(params[0]DIALOG_BTAKE,DIALOG_STYLE_LIST,"Багажник","Оружие(Слот:1)\nОружие(Слот:2)\nОружие(Слот:3)\nОружие(Слот:4)\nОружие(Слот:5)\nОружие(Слот:6)\nНаркотики(Слот:1)\nНаркотики(Слот:2)\nНаркотики(Слот:3)", "Забрать", "Закрыть");
}
else
{
if(params[0] == playerid) return SendClientMessage(playerid, COLOR_YELLOW, " В этом транспорте нет багажника!");
return true;
