PDA

Просмотр полной версии : [Вопрос] Не работает команда



Andrik851
27.01.2019, 14:50
когда ввожу команду пишет вы должны находится в личном автомобиле



CMD:carpass(playerid, params[])
{
if(PlayerLogged[playerid] == 0) return true;
if(PlayerInfo[playerid][cModel] == 0) return SendClientMessage(playerid, COLOR_GREY, YouDoNotHaveAnyCar);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotInCar);
if(GetPlayerVehicleID(playerid) != PlayerInfo[playerid][cCarId]) return SendClientMessage(playerid, COLOR_GREY, "Вы должны находиться в вашем личном транспорте!");
if(sscanf(params, "u", params[0], params[1])) return SendClientMessage(playerid, COLOR_WHITE, "• {ffcf00}[ Подсказка ] {ffffff}Введите: /carpass [id игрока] [1/2/3]");
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid, COLOR_GREY, TPLAYEROFFLINE);
if(PlayerLogged[params[0]] == 0) return SendClientMessage(playerid, COLOR_GREY, TPLAYERNLOGGED);
switch(params[1])
{
case 1:
{
SendClientMessage(params[0], COLOR_YELLOW,"[==================== ПТС =======================]");
SendMes(params[0], COLOR_YELLOW, "[ Владелец: {ffffff}%s ]",PlayerInfo[playerid][pSendername]);
SendMes(params[0], COLOR_YELLOW, "[ Модель: {ffffff}%s ]",VehicleNameS[GetVehicleModel(PlayerInfo[playerid][cCarId][0])-400]);
SendMes(params[0], COLOR_YELLOW, "[ Гос.Знак: {ffffff}%s ]",PlayerInfo[playerid][cNumber1]);
if(PlayerInfo[playerid][cClass][0] == 3) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}C ]");
if(PlayerInfo[playerid][cClass][0] == 2) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}B ]");
if(PlayerInfo[playerid][cClass][0] == 1) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}A ]");
if(PlayerInfo[playerid][cClass][0] == 4) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}Нет ]");
SendClientMessage(params[0], COLOR_YELLOW,"[================================================]");
format(totalstring, 100, "%s показал(а) документы на транспорт %s", PlayerInfo[playerid][pSendername], sendername(params[0]));
ProxDetectorNew(playerid, 30.0, COLOR_PURPLE, totalstring);
}
case 2:
{
SendClientMessage(params[0], COLOR_YELLOW,"[==================== ПТС =======================]");
SendMes(params[0], COLOR_YELLOW, "[ Владелец: {ffffff}%s ]",PlayerInfo[playerid][pSendername]);
SendMes(params[0], COLOR_YELLOW, "[ Модель: {ffffff}%s ]",VehicleNameS[GetVehicleModel(PlayerInfo[playerid][cCarId][1])-400]);
SendMes(params[0], COLOR_YELLOW, "[ Гос.Знак: {ffffff}%s ]",PlayerInfo[playerid][cNumber2]);
if(PlayerInfo[playerid][cClass][1] == 3) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}C ]");
if(PlayerInfo[playerid][cClass][1] == 2) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}B ]");
if(PlayerInfo[playerid][cClass][1] == 1) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}A ]");
if(PlayerInfo[playerid][cClass][1] == 4) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}Нет ]");
SendClientMessage(params[0], COLOR_YELLOW,"[================================================]");
format(totalstring, 100, "%s показал(а) документы на транспорт %s", PlayerInfo[playerid][pSendername], sendername(params[0]));
ProxDetectorNew(playerid, 30.0, COLOR_PURPLE, totalstring);
}
case 3:
{
SendClientMessage(params[0], COLOR_YELLOW,"[==================== ПТС =======================]");
SendMes(params[0], COLOR_YELLOW, "[ Владелец: {ffffff}%s ]",PlayerInfo[playerid][pSendername]);
SendMes(params[0], COLOR_YELLOW, "[ Модель: {ffffff}%s ]",VehicleNameS[GetVehicleModel(PlayerInfo[playerid][cCarId][2])-400]);
SendMes(params[0], COLOR_YELLOW, "[ Гос.Знак: {ffffff}%s ]",PlayerInfo[playerid][cNumber3]);
if(PlayerInfo[playerid][cClass][2] == 3) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}C ]");
if(PlayerInfo[playerid][cClass][2] == 2) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}B ]");
if(PlayerInfo[playerid][cClass][2] == 1) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}A ]");
if(PlayerInfo[playerid][cClass][2] == 4) SendClientMessage(params[0], COLOR_YELLOW, "[ Класс: {ffffff}Нет ]");
SendClientMessage(params[0], COLOR_YELLOW,"[================================================]");
format(totalstring, 100, "%s показал(а) документы на транспорт %s", PlayerInfo[playerid][pSendername], sendername(params[0]));
ProxDetectorNew(playerid, 30.0, COLOR_PURPLE, totalstring);
}
}
return true;
}