Ко всем new
Code: Select all
new windowcar[MAX_VEHICLES];
Опускание
Code: Select all
if(strcmp(cmd, "/windowdown", true) == 0||strcmp(cmd, "/wd", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new carrr = GetPlayerVehicleID(playerid);
new moda = GetVehicleModel(carrr);
if(moda == 448 || moda >= 461 && moda <= 463 || moda == 468 || moda == 471 || moda == 481 || moda == 501 || moda == 510 || moda >= 521 && moda <= 523 || moda == 581 || moda == 586)
{
SendClientMessage(playerid,COLOR_GREY,"Вы сидите в транспорте, в котором не предназначены стекла");
}
else
{
if(windowcar[carrr] == 1)
{
windowcar[carrr] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s опускает стекла транспорта", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,0,0);
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Стекла в транспорте уже опущены");
}
}
}
}
return 1;
}
поднятие
Code: Select all
if(strcmp(cmd, "/windowup", true) == 0||strcmp(cmd, "/wu", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new carrr = GetPlayerVehicleID(playerid);
new moda = GetVehicleModel(carrr);
if(moda == 448 || moda >= 461 && moda <= 463 || moda == 468 || moda == 471 || moda == 481 || moda == 501 || moda == 510 || moda >= 521 && moda <= 523 || moda == 581 || moda == 586)
{
SendClientMessage(playerid,COLOR_GREY,"Вы сидите в транспорте, в котором не предназначены стекла");
}
else
{
if(windowcar[carrr] == 0)
{
windowcar[carrr] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s поднимает стекла транспорта", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,0,0);
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Стекла в транспорте уже подняты");
}
}
}
}
return 1;
}