The thing is ... That by using the command / siren, the siren was to attach to the car (it was okay), but now the object is simply created on the coordinates of X - 0 Y - 0 Z - 0 = \
Код:
if(strcmp(cmd, "/siren", true) == 0)
{
if(IsPlayerConnected(playerid) && IsACop(playerid))
{
new model = GetVehicleModel(gPCar[playerid]);
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "*Âû íå èç ïîäðàçäåëåíèÿ HSHQ!");
return 1;
}
if(gPCar[playerid] >= CopSport[0] && gPCar[playerid] <= CopSport[7])
{
if(SportSiren[playerid] == 1)
{
DestroyObject(SportCar[playerid][0]);
DestroyObject(SportCar[playerid][1]);
DestroyObject(SportCar[playerid][2]);
DestroyObject(SportCar[playerid][3]);
DestroyObject(SportCar[playerid][4]);
format(string, sizeof(string), "%s âûêëþ÷èë ïðîáëåñêîâûå ìàÿ÷êè", GetPlayerNameEx(playerid));
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 10.0, 6000);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SportSiren[playerid] = 0;
return 1;
}
SportSiren[playerid] = 1;
DestroyObject(SportCar[playerid][0]);
DestroyObject(SportCar[playerid][1]);
DestroyObject(SportCar[playerid][2]);
DestroyObject(SportCar[playerid][3]);
DestroyObject(SportCar[playerid][4]);
SportCar[playerid][0] = CreateObject(18646, 0, 0, 0, 0, 0, 0);
SportCar[playerid][1] = CreateObject(18646, 0, 0, 0, 0, 0, 0);
SportCar[playerid][2] = CreateObject(18646, 0, 0, 0, 0, 0, 0);
SportCar[playerid][3] = CreateObject(18646, 0, 0, 0, 0, 0, 0);
SportCar[playerid][4] = CreateObject(18646, 0, 0, 0, 0, 0, 0);
format(string, sizeof(string), "%s âêëþ÷èë ïðîáëåñêîâûå ìàÿ÷êè", GetPlayerNameEx(playerid));
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 10.0, 6000);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(model == 451) //Turismo 0 0.7 0.45 0 0 0
{
AttachObjectToVehicle(SportCar[playerid][0], gPCar[playerid], 0, -0.4, 0.6, 0,0,0);
AttachObjectToVehicle(SportCar[playerid][1], gPCar[playerid], 0.5, -0.4, 0.6, 0,0,0);
AttachObjectToVehicle(SportCar[playerid][2], gPCar[playerid], -0.5, -0.4, 0.6, 0,0,0);
AttachObjectToVehicle(SportCar[playerid][3], gPCar[playerid], 0.4, 2.48, -0.46, 0,0,0);
AttachObjectToVehicle(SportCar[playerid][4], gPCar[playerid], -0.4, 2.48, -0.46, 0,0,0);
return 1;
}
if(model == 522) //NRG-500
{
AttachObjectToVehicle(SportCar[playerid][0], gPCar[playerid], 0, 0.7, 0.45, 0, 0, 0);
return 1;
}
if(model == 411) //Infernus
{
AttachObjectToVehicle(SportCar[playerid][0], gPCar[playerid], 0, 0, 0.74, 0, 0, 0);
AttachObjectToVehicle(SportCar[playerid][1], gPCar[playerid], 0.4, 0, 0.74, 0, 0, 0);
AttachObjectToVehicle(SportCar[playerid][2], gPCar[playerid], -0.4, 0, 0.74, 0, 0, 0);
AttachObjectToVehicle(SportCar[playerid][3], gPCar[playerid], -0.2, 2.74, -0.3, 0, 0, 0);
AttachObjectToVehicle(SportCar[playerid][4], gPCar[playerid], 0.2, 2.74, -0.3, 0, 0, 0);
return 1;
}
if(model == 415) //Cheetach 0.4 -0.2 0.6 0 0 0
{
AttachObjectToVehicle(SportCar[playerid][0], gPCar[playerid], 0.4, -0.2, 0.6, 0, 0, 0);
AttachObjectToVehicle(SportCar[playerid][1], gPCar[playerid], -0.4, -0.2, 0.6, 0, 0, 0);
AttachObjectToVehicle(SportCar[playerid][2], gPCar[playerid], 0, -0.2, 0.6, 0, 0, 0);
AttachObjectToVehicle(SportCar[playerid][3], gPCar[playerid], 0.24, 2.6, -0.22, 0, 0, 0);
AttachObjectToVehicle(SportCar[playerid][4], gPCar[playerid], -0.24, 2.6, -0.22, 0, 0, 0);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "*Âû íå â àâòî HSHQ!");
}
}
return 1;
}
And apart from the siren no more visible ... : ( Incognito Streamer still shows no objects