Помогите когда вторую тачку покупаю пишу /park или /lock 1 пишет у вас нет тачки. Помогите плизз если надо строчку с /lock Скину. Скажите люди добрые что заменить и на что.
Code
if (strcmp(cmd, "/park", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCarKey2] == 0 && PlayerInfo[playerid][pCarKey] == 0)
{
SendClientMessage(playerid,COLOR_GREY,"У вас нет тачки");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
new cari = GetPlayerVehicleID(playerid);
if(cari == PlayerInfo[playerid][pCarKey2] || cari == PlayerInfo[playerid][pCarKey])
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
new Float:xcar, Float:ycar, Float:zcar, Float:ancar;
new mods = GetVehicleModel(cari);
GetVehicleZAngle(cari, ancar);
GetVehiclePos(cari,xcar,ycar,zcar);
DestroyVehicle(cari);
CreateVehicle(mods,xcar,ycar,zcar,ancar,AutoInfo[cari][aColor1],AutoInfo[cari][aColor2],SPAWN_CARS);
AutoInfo[cari][aAutoX] = xcar;
AutoInfo[cari][aAutoY] = ycar;
AutoInfo[cari][aAutoZ] = zcar;
AutoInfo[cari][aAutoAngle] = ancar;
SaveAuto();
if(AutoInfo[cari][a0] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a0]);
}
if(AutoInfo[cari][a1] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a1]);
}
if(AutoInfo[cari][a2] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a2]);
}
if(AutoInfo[cari][a3] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a3]);
}
if(AutoInfo[cari][a4] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a4]);
}
if(AutoInfo[cari][a5] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a5]);
}
if(AutoInfo[cari][a6] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a6]);
}
if(AutoInfo[cari][a7] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a7]);
}
if(AutoInfo[cari][a8] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a8]);
}
if(AutoInfo[cari][a9] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a9]);
}
if(AutoInfo[cari][a10] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a10]);
}
if(AutoInfo[cari][a11] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a11]);
}
if(AutoInfo[cari][a12] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a12]);
}
if(AutoInfo[cari][a13] != 0)
{
AddVehicleComponent(cari, AutoInfo[cari][a13]);
}
if(AutoInfo[cari][aPaintJob] != 0)
{
ChangeVehiclePaintjob(cari,AutoInfo[cari][aPaintJob]);
}
SendClientMessage(playerid,COLOR_YELLOW,"Транспорт припаркован!");
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Вы не в своей купленной тачке");
}
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Вы не в тачке");
}
}
return 1;
}