Помогите баг с движком мод АРЗ РП

Samper338

Новичок
Автор темы
3
0
Суть в том что заводятся только мотоциклы (личные арендованые) и мопеды арендовоные остольное Т/С вообще не заводятся просто нажимаю прописываю команду нечего не происходит надеюсь поможете


Вопросы и надо большое пишите мне в ВК - *тык*














CMD:engine(playerid, params[])
{
if(GetPlayerState(playerid) != 2) return false;
if(engines[playerid]>gettime())return SendClientMessage(playerid,COLOR_GREY, !"Нельзя так часто заводить двигатель");
new carid = GetPlayerVehicleID(playerid);
if(IsAVelik(carid)) return false;
if(GetEngineStatus(carid) < 1)
{
if(IsAArendCar(carid))
{
new rentid = GetArendCarID(carid);
if(ArendInfo[rentid][aRentID] != playerid) return false;
}
if(GetVehicleModel(carid)==437)if(pTemp[playerid][pArendaCar]==-1)return ToCheat(1,playerid);
if(GetPlayerVirtualWorld(playerid)!=1228)
{
if(IsACar(carid) && !PlayerInfo[playerid][pCarLic] && CarTest[playerid] == -1) return false;
if(IsABike(carid) && !PlayerInfo[playerid][pBikeLic]) return false;
if(IsABoat(carid) && !PlayerInfo[playerid][pBoatLic]) return false;
}
if(Fuel[carid] > 0.0)
{
{
new Float:Health, string[50];
GetVehicleHealth(carid, Health);
if(Health > 1000) Health = 1000.0;
else if(Health < 400) return SendClientMessage(playerid, COLOR_GREY, !"Вы не можете завести двигатель. Для его починки вызовите механика");
new UNEngine = floatround(2000.0 - Health);
if(UNEngine < 0) UNEngine = 0;
else if(UNEngine > 2000) UNEngine = 2000;
SetTimerEx("EngineVehicle", UNEngine, false, "ii", playerid, carid);
format(string, sizeof(string), " %s пытается завести двигатель", cPN(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE);
engines[playerid]=gettime()+4;
}
}
else return SendClientMessage(playerid,COLOR_GREY, !"Нет топлива");
}
else
{
new string[70];
SetEngineStatus(carid,false, playerid);
format(string,sizeof(string)," %s заглушил(а) двигатель",cPN(playerid));
ProxDetector(25.0,playerid,string,COLOR_PURPLE);
//SpeedOFF(playerid, carid, 2);
}
return true;
}





//PUBLICS

public EngineVehicle(playerid, vehicleid)
{
if(IsPlayerInVehicle(playerid,vehicleid))
{
{
new Float:Health;
GetVehicleHealth(vehicleid, Health);
if(Health > 1000.0) Health = 1000.0;
new hp = 11 - floatround(Health / 100.0);
new uEngine = random(hp);
new string[150];
if(uEngine < 4)
{
SetEngineStatus(vehicleid, true, playerid);
format(string,sizeof(string)," Двигатель успешно завелся | - %s .",cPN(playerid));
if(ssssss == 0)ProxDetector(25.0,playerid,string,COLOR_DOCHAT);
if(LightsObject[vehicleid][0]!=-1 || LightsObject[vehicleid][1]!=-1)
{
DestroyDynamicObject(LightsObject[vehicleid][0]);
DestroyDynamicObject(LightsObject[vehicleid][1]);
LightsObject[vehicleid][0] = -1;
LightsObject[vehicleid][1] = -1;
SignalTick[vehicleid][0] = 0;
SignalTick[vehicleid][1] = -1;
Signal[vehicleid] = 0;
}
}
else
{
format(string,sizeof(string)," Двигатель не завелся | - %s.",cPN(playerid));
ProxDetector(25.0,playerid,string,COLOR_DOCHAT);
}
}
}
return true;













publics SetEngineStatus(carid,status, playerid)
{
GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carid,status,lights,alarm,doors,bonnet,boot,objective);
VehicleInfo[carid][vEngine] = status;
if(!status)
{
SetLightsStatus(carid, false, playerid != -1? playerid: -1);
if(Signal[carid])
{
DestroyDynamicObject(LightsObject[carid][0]);
DestroyDynamicObject(LightsObject[carid][1]);
LightsObject[carid][0] = -1;
LightsObject[carid][1] = -1;
SignalTick[carid][0] = 0;
SignalTick[carid][1] = -1;
Signal[carid] = 0;
}
if(playerid != -1 && !IsABMX(carid) && !IsAPlane(carid))
{
if(PlayerInfo[playerid][pGold]>0)
{
PlayerTextDrawSetString(playerid, speeddraw[playerid][4], "0");
PlayerTextDrawSetString(playerid, speeddraw[playerid][3], "_");
}
}
}
if(playerid != -1 && !IsABMX(carid) && !IsAPlane(carid) && GetPlayerState(playerid)==2)
{
if(PlayerInfo[playerid][pGold]>0)
{
if(PlayerInfo[playerid][pTypeSpeed] == 0) {
PlayerTextDrawDestroy(playerid, speeddraw[playerid][2]);
speeddraw[playerid][2] = CreatePlayerTextDraw(playerid, 603.000000, 396.000000, "eng"); //????????? ??? ??
PlayerTextDrawAlignment(playerid, speeddraw[playerid][2], 2);
PlayerTextDrawBackgroundColor(playerid, speeddraw[playerid][2], 255);
PlayerTextDrawFont(playerid, speeddraw[playerid][2], 2);
PlayerTextDrawLetterSize(playerid, speeddraw[playerid][2], 0.259999, 1.600000);
PlayerTextDrawColor(playerid, speeddraw[playerid][2], -1);
PlayerTextDrawSetOutline(playerid, speeddraw[playerid][2], 0);
PlayerTextDrawSetProportional(playerid, speeddraw[playerid][2], 1);
PlayerTextDrawSetShadow(playerid, speeddraw[playerid][2], 1);
PlayerTextDrawUseBox(playerid, speeddraw[playerid][2], 1);
PlayerTextDrawBoxColor(playerid, speeddraw[playerid][2], (VehicleInfo[carid][vEngine])?576000767:-1407312129);
PlayerTextDrawTextSize(playerid, speeddraw[playerid][2], 241.000000, 28.000000);
PlayerTextDrawSetSelectable(playerid, speeddraw[playerid][2], 0);
PlayerTextDrawShow(playerid, speeddraw[playerid][2]); }
else {
PlayerTextDrawDestroy(playerid, speed_prodvin[playerid][33]);
speed_prodvin[playerid][33] = CreatePlayerTextDraw(playerid, 540.133301, 394.433105, "000");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][33], 0.244200, 1.873700);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][33], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][33], 2);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][33], (VehicleInfo[carid][vEngine])?0xA52A2AFF:0x282828FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][33], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][33], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][33], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][33], 1);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][33], 0x00000015);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][33], 2);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][33], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][33], 0);
PlayerTextDrawShow(playerid, speed_prodvin[playerid][33]);
//ôàðû
for(new i = 27; i < 30; i++) PlayerTextDrawDestroy(playerid, speed_prodvin[playerid]);
speed_prodvin[playerid][29] = CreatePlayerTextDraw(playerid, 565.433228, 390.829498, "D");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][29], -0.185200, 1.367599);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][29], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][29], 1);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][29], (VehicleInfo[carid][vEngine])?0xA52A2AFF:0x282828FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][29], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][29], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][29], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][29], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][29], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][29], 2);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][29], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][29], 0);

speed_prodvin[playerid][28] = CreatePlayerTextDraw(playerid, 565.766602, 390.362915, "=");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][28], 0.197300, 1.180899);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][28], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][28], 1);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][28], (VehicleInfo[carid][vEngine])?0xA52A2AFF:0x282828FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][28], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][28], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][28], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][28], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][28], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][28], 1);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][28], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][28], 0);

speed_prodvin[playerid][27] = CreatePlayerTextDraw(playerid, 565.566528, 394.362915, "=");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][27], 0.201900, 1.156100);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][27], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][27], 1);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][27], (VehicleInfo[carid][vEngine])?0xA52A2AFF:0x282828FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][27], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][27], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][27], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][27], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][27], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][27], 1);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][27], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][27], 0);
for(new i = 27; i < 30; i++) PlayerTextDrawShow(playerid, speed_prodvin[playerid]);
///
new temptext[16], number = GetVehicleID(carid);
PlayerTextDrawDestroy(playerid, speed_prodvin[playerid][12]);
if(IsAOwnableCar(carid)) format(temptext, sizeof(temptext), "%08.0f", CarInfo[number][cMilage]); format(temptext, sizeof(temptext), "00000000");
speed_prodvin[playerid][12] = CreatePlayerTextDraw(playerid, 608.833618, 408.877594, temptext);
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][12], 0.149499, 0.948700);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][12], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][12], 2);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][12], (VehicleInfo[carid][vEngine])?0xA52A2AFF:0x282828FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][12], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][12], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][12], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][12], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][12], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][12], 2);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][12], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][12], 0);
PlayerTextDrawShow(playerid, speed_prodvin[playerid][12]);
//fuel
for(new i = 3; i < 9; i++) PlayerTextDrawDestroy(playerid, speed_prodvin[playerid]);
speed_prodvin[playerid][8] = CreatePlayerTextDraw(playerid, 529.766602, 429.755188, "O");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][8], 0.183300, 0.753700);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][8], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][8], 2);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][8], (VehicleInfo[carid][vEngine])?0x14DB43FF:0x808080FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][8], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][8], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][8], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][8], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][8], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][8], 3);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][8], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][8], 0);

speed_prodvin[playerid][7] = CreatePlayerTextDraw(playerid, 530.099915, 425.854889, "O");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][7], 0.144899, 0.679000);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][7], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][7], 2);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][7], (VehicleInfo[carid][vEngine])?0x14DB43FF:0x808080FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][7], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][7], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][7], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][7], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][7], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][7], 2);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][7], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][7], 0);

speed_prodvin[playerid][6] = CreatePlayerTextDraw(playerid, 532.799805, 427.299408, "S");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][6], 0.157000, 0.998399);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][6], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][6], 2);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][6], (VehicleInfo[carid][vEngine])?0x14DB43FF:0x808080FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][6], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][6], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][6], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][6], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][6], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][6], 1);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][6], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][6], 0);

speed_prodvin[playerid][5] = CreatePlayerTextDraw(playerid, 536.133301, 429.577606, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][5], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][5], 80.000000, 4.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][5], 1);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][5], 0x282828FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][5], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][5], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][5], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][5], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][5], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][5], 4);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][5], 0);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][5], 0);

speed_prodvin[playerid][4] = CreatePlayerTextDraw(playerid, 536.133301, 429.577606, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][4], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][4], 77.857529, 3.940000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][4], 1);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][4], (VehicleInfo[carid][vEngine])?0x14DB43FF:0x808080FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][4], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][4], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][4], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][4], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][4], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][4], 4);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][4], 0);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][4], 0);

speed_prodvin[playerid][3] = CreatePlayerTextDraw(playerid, 622.033203, 427.384613, "99%");
PlayerTextDrawLetterSize(playerid, speed_prodvin[playerid][3], 0.116300, 0.820100);
PlayerTextDrawTextSize(playerid, speed_prodvin[playerid][3], 1280.000000, 1280.000000);
PlayerTextDrawAlignment(playerid, speed_prodvin[playerid][3], 2);
PlayerTextDrawColor(playerid, speed_prodvin[playerid][3], (VehicleInfo[carid][vEngine])?0x14DB43FF:0x808080FF);
PlayerTextDrawUseBox(playerid, speed_prodvin[playerid][3], 0);
PlayerTextDrawBoxColor(playerid, speed_prodvin[playerid][3], 0x80808080);
PlayerTextDrawSetShadow(playerid, speed_prodvin[playerid][3], 0);
PlayerTextDrawSetOutline(playerid, speed_prodvin[playerid][3], 0);
PlayerTextDrawBackgroundColor(playerid, speed_prodvin[playerid][3], 0x000000FF);
PlayerTextDrawFont(playerid, speed_prodvin[playerid][3], 2);
PlayerTextDrawSetProportional(playerid, speed_prodvin[playerid][3], 1);
PlayerTextDrawSetSelectable(playerid, speed_prodvin[playerid][3], 0);
for(new i = 3; i < 9; i++) PlayerTextDrawShow(playerid, speed_prodvin[playerid]); }
}
}
return true;
}
 
Последнее редактирование: