Slavko...
Умник
Всем привет
Как я уже обещал выложить фильтерскрипт етого чуда в сампе:Розпишу как мануал:
В начало мода:
PHP:
#define COLOR_YELLOW 0xFFFF00FF
new oPark, oPark1, oPark2, oPark3, oPark4, oPark5;
new oPark_1;
new oPark_Matik, oPark_Matik1, oPark_Matik2;
new oMatik, oMatik1, oMatik2, oMatik3, oMatik4, oMatik5;
new oMatik_1;
new gControllable[MAX_PLAYERS];
new gGateStatus[26];
enum pInfo//для считывания из файла
{
pLevel,//уровень 1
};
new PlayerInfo[MAX_PLAYERS][pInfo];
new Parktimer_1, Parktimer1, Parktimer11, Parktimer2, Parktimer22, Parktimer3, Parktimer33, Parktimer4, Parktimer44, Parktimer5, Parktimer55;
new Matiktimer_1, Matiktimer1, Matiktimer11, Matiktimer2, Matiktimer22, Matiktimer3, Matiktimer33, Matiktimer4, Matiktimer44, Matiktimer5, Matiktimer55;
new atimer;
PHP:
forward tParkClose_1(); forward tParkClose(); forward tPark1Close(); forward tPark11Close(); forward tPark2Close(); forward tPark22Close(); forward tPark3Close(); forward tPark33Close(); forward tPark4Close(); forward tPark44Close(); forward tPark5Close(); forward tPark55Close();
forward tMatikClose_1(); forward tMatikClose(); forward tMatik1Close(); forward tMatik11Close(); forward tMatik2Close(); forward tMatik22Close(); forward tMatik3Close(); forward tMatik33Close(); forward tMatik4Close(); forward tMatik44Close(); forward tMatik5Close(); forward tMatik55Close();
forward taClose();
PHP:
stock TogglePlayerControllableEx(playerid, toggle)
{ //toggle - 0 or 1, (1 - thawed, 0 - frozen)
if(toggle == 1)
{
TogglePlayerControllable(playerid, true);//освобождает
gControllable[playerid] = 0;
}
else// if(toggle == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
}
else SetPlayerVelocity(playerid, 0.0, 0.0, 0.0);
TogglePlayerControllable(playerid, false);//обездвиживает
gControllable[playerid] = 1;
}
return 1;
}
stock IsKeyJustDown(key, newkeys, oldkeys)
{ //возвращает верно если произошло нажатие
if((newkeys & key) && !(oldkeys & key)) return 1;
return 0;
}
PHP:
CreateObject(3095, 1353.94, -1677.63, 25.75, 90.00, 0.00, 90.00);
CreateObject(3095, 1362.82, -1682.45, 25.79, 90.00, 0.00, 180.00);
CreateObject(3095, 1367.33, -1677.63, 25.83, 90.00, 0.00, 270.00);
CreateObject(3095, 1358.45, -1682.42, 25.84, 90.00, 0.00, 180.00);
CreateObject(3095, 1353.96, -1677.61, 16.81, 90.00, 0.00, 90.00);
CreateObject(3095, 1358.45, -1682.42, 16.85, 90.00, 0.00, 180.00);
CreateObject(3095, 1362.82, -1682.45, 16.85, 90.00, 0.00, 180.00);
CreateObject(3095, 1367.33, -1677.63, 16.85, 90.00, 0.00, 270.00);
oPark = CreateObject(10558, 1356.25, -1677.75, 12.35, 0.00, 90.00, 0.00);
oPark1 = CreateObject(10558, 1356.43, -1677.55, 15.81, 0.00, 90.00, 0.00);
oPark2 = CreateObject(10558, 1356.43, -1677.55, 18.74, 0.00, 90.00, 0.00);
oPark3 = CreateObject(10558, 1356.43, -1677.55, 21.61, 0.00, 90.00, 0.00);
oPark4 = CreateObject(10558, 1356.43, -1677.55, 24.42, 0.00, 90.00, 0.00);
oPark5 = CreateObject(10558, 1356.43, -1677.57, 27.32, 0.00, 90.00, 0.00);
oMatik = CreateObject(10558, 1364.83, -1677.83, 12.31, 0.00, 90.00, 0.00);
oMatik1 = CreateObject(10558, 1364.72, -1677.60, 15.81, 0.00, 90.00, 0.00);
oMatik2 = CreateObject(10558, 1364.72, -1677.60, 18.74, 0.00, 90.00, 0.00);
oMatik3 = CreateObject(10558, 1364.72, -1677.60, 21.61, 0.00, 90.00, 0.00);
oMatik4 = CreateObject(10558, 1364.72, -1677.60, 24.42, 0.00, 90.00, 0.00);
oMatik5 = CreateObject(10558, 1364.72, -1677.60, 27.32, 0.00, 90.00, 0.00);
oPark_Matik1 = CreateObject(10558, 1360.59, -1677.52, 15.81, 0.00, 90.00, 0.00);
oPark_Matik = CreateObject(2957, 1360.47, -1673.31, 14.17, 0.00, 0.00, 0.00);
oPark_Matik2 = CreateObject(988, 1364.3604, -1664.4230, 12.7648, 0.00, 0.00, 180.00);
oPark_1 = CreateObject(10558, 1358.54, -1677.51, 13.95, 0.00, 0.00, 0.00);
oMatik_1 = CreateObject(10558, 1362.97, -1677.54, 13.95, 0.00, 0.00, 0.00);
CreateObject(3851, 1359.51, -1673.10, 21.72, 90.00, 0.00, 270.00);
CreateObject(3851, 1364.85, -1673.14, 21.72, 90.00, 0.00, 270.00);
CreateObject(3851, 1361.07, -1673.13, 21.72, 90.00, 0.00, 270.00);
CreateObject(3851, 1356.27, -1673.12, 21.72, 90.00, 0.00, 270.00);
CreateObject(3851, 1361.38, -1673.13, 28.47, 0.00, 0.00, 269.80);
CreateObject(3851, 1359.87, -1673.14, 28.47, 0.00, 0.00, 269.80);
CreateObject(3095, 1358.52, -1677.66, 30.40, 180.00, 0.00, 90.00);
CreateObject(3095, 1362.76, -1677.69, 30.38, 180.00, 0.00, 0.00);
CreateObject(3498, 1358.35, -1673.28, 25.84, 0.00, 0.00, 0.00);
CreateObject(3498, 1358.35, -1673.30, 17.11, 0.00, 0.00, 0.00);
CreateObject(3498, 1362.70, -1673.33, 25.83, 0.00, 0.00, 0.00);
CreateObject(3498, 1362.70, -1673.33, 17.11, 0.00, 0.00, 0.00);
CreateObject(3498, 1358.42, -1681.87, 16.85, 0.00, 0.00, 0.00);
CreateObject(3498, 1358.42, -1681.87, 25.84, 0.00, 0.00, 0.00);
CreateObject(3498, 1362.69, -1681.96, 16.82, 0.00, 0.00, 0.00);
CreateObject(3498, 1362.69, -1681.96, 25.84, 0.00, 0.00, 0.00);
CreateObject(3095, 1353.96, -1668.64, 25.76, 90.00, 0.00, 90.00);
CreateObject(3095, 1353.96, -1668.64, 16.81, 90.00, 0.00, 90.00);
CreateObject(3095, 1358.47, -1664.12, 25.70, 90.00, 0.00, 0.00);
CreateObject(3095, 1358.47, -1664.12, 16.81, 90.00, 0.00, 0.00);
CreateObject(3095, 1367.22, -1668.76, 25.78, 90.00, 0.00, 270.00);
CreateObject(3095, 1367.22, -1668.76, 16.85, 90.00, 0.00, 270.00);
CreateObject(3095, 1362.62, -1664.24, 25.78, 90.00, 0.00, 0.00);
CreateObject(3095, 1362.62, -1664.22, 20.63, 90.00, 0.00, 0.00);
CreateObject(3095, 1358.61, -1668.85, 30.38, 180.00, 0.00, 90.00);
CreateObject(3095, 1362.75, -1668.86, 30.36, 180.00, 0.00, 0.00);
CreateObject(7914, 1366.93, -1673.58, 25.40, 0.00, 0.00, 90.00);
CreateObject(1223, 1361.71, -1663.33, 12.37, 0.00, 0.00, 11.00);
CreateObject(1223, 1367.91, -1663.47, 12.37, 0.00, 0.00, 164.00);
CreateObject(1294, 1362.74, -1665.96, 16.78, 0.00, 0.00, 88.61);
CreateObject(1294, 1357.50, -1665.92, 16.78, 0.00, 0.00, 88.61);
CreateObject(1294, 1362.22, -1672.00, 16.78, 0.00, 0.00, -69.00);
CreateObject(1294, 1358.86, -1671.94, 16.78, 0.00, 0.00, -113.00);
CreateObject(16500, 1356.28, -1673.20, 14.90, 90.00, 0.00, 90.00);
CreateObject(16500, 1364.92, -1673.24, 14.90, 90.00, 0.00, 90.00);
CreateObject(16500, 1360.46, -1673.24, 18.51, 90.00, 0.00, 90.00);
CreateObject(1692, 1360.58, -1668.26, 31.14, 0.00, 0.00, 0.00);
CreateObject(1692, 1360.38, -1677.54, 31.14, 0.00, 0.00, 0.00);
CreateObject(19124, 1366.71, -1665.01, 30.56, 0.00, 0.00, 0.00);
CreateObject(19124, 1354.55, -1664.98, 30.56, 0.00, 0.00, 0.00);
CreateObject(19124, 1354.40, -1680.71, 30.56, 0.00, 0.00, 0.00);
CreateObject(19124, 1366.62, -1681.52, 30.56, 0.00, 0.00, 0.00);
CreateObject(19122, 1354.58, -1673.08, 12.60, 0.00, 0.00, 0.00);
CreateObject(19122, 1354.59, -1664.73, 12.60, 0.00, 0.00, 0.00);
CreateObject(19122, 1366.64, -1673.09, 12.60, 0.00, 0.00, 0.00);
CreateObject(19122, 1362.85, -1664.70, 12.60, 0.00, 0.00, 0.00);
CreateObject(19122, 1366.65, -1664.82, 12.60, 0.00, 0.00, 0.00);
CreateObject(2618, 1364.65, -1672.70, 12.56, 0.00, 0.00, 180.00);
CreateObject(2618, 1356.25, -1672.59, 12.56, 0.00, 0.00, 180.00);
CreateObject(2886, 1361.01, -1664.19, 14.13, 0.00, 0.00, 180.00);//пульт
CreateObject(644, 1362.56, -1663.73, 12.76, 0.00, 0.00, 0.00);//растения
CreateObject(644, 1366.98, -1663.65, 12.76, 0.00, 0.00, 0.00);
CreateObject(948, 1354.96, -1668.41, 12.60, 0.00, 0.00, 0.00);
CreateObject(1364, 1355.91, -1666.07, 13.14, 0.00, 0.00, 47.00);
CreateObject(948, 1358.28, -1665.04, 12.60, 0.00, 0.00, 0.00);
PHP:
if(IsKeyJustDown(KEY_CROUCH, newkeys, oldkeys))//H
{ //если игрок посигналил
//Put hooks for players in a car here
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(PlayerInfo[playerid][pLevel] >= 3)
{
if(IsPlayerInRangeOfPoint(playerid,6.0,1364.7721, -1664.6409, 12.5334))
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1358.56, -1664.38, 16.04, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1362.27, -1664.41, 16.04, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
}
}
if(IsKeyJustDown(KEY_SECONDARY_ATTACK,newkeys,oldkeys))
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pLevel] >= 3)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1361.0139, -1664.1909, 14.1319))
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Вы должны проживать в штате больше 3 годов, чтобы открыть ети ворота");
}
}
}
if(IsPlayerInRangeOfPoint(playerid,2.0,1356.3787, -1672.5498, 12.5663))//обновил! тут привязка к диалогу!
{
new listitems[] = "1 stage\n2 stage\n3 stage\n4 stage\n5 stage\n6 stage";
ShowPlayerDialog(playerid,333,DIALOG_STYLE_LIST,"Park-Matik",listitems,"OK","Îòìåíà");
TogglePlayerControllableEx(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,2.0,1364.7000, -1672.6945, 12.5663))
{
new listitems[] = "1 stage\n2 stage\n3 stage\n4 stage\n5 stage\n6 stage";
ShowPlayerDialog(playerid,340,DIALOG_STYLE_LIST,"Park-Matik",listitems,"OK","Îòìåíà");
TogglePlayerControllableEx(playerid, 0);
return 1;
}
PHP:
if(dialogid == 333)
{ //ShowPlayerDialog(playerid,333,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,334,DIALOG_STYLE_LIST,"Park-Matik _1 stage_",listitems,"OK","Cancel");
}
else if(listitem == 1)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,335,DIALOG_STYLE_LIST,"Park-Matik _2 stage_",listitems,"OK","Cancel");
}
else if(listitem == 2)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,336,DIALOG_STYLE_LIST,"Park-Matik _3 stage_",listitems,"OK","Cancel");
}
else if(listitem == 3)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,337,DIALOG_STYLE_LIST,"Park-Matik _4 stage_",listitems,"OK","Cancel");
}
else if(listitem == 4)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,338,DIALOG_STYLE_LIST,"Park-Matik _5 stage_",listitems,"OK","Cancel");
}
else if(listitem == 5)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,339,DIALOG_STYLE_LIST,"Park-Matik _6 stage_",listitems,"OK","Cancel");
}
}
else
{
//gShowDialog[playerid] = 0;
}
TogglePlayerControllableEx(playerid, 1);
return 1;
}
else if(dialogid == 334)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[1] == 1)
{
MoveObject(oPark,1356.2500, -1677.7500, 12.3500, 1.0);
MoveObject(oPark_1,1358.5400, -1677.5100, 18.1276, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Parktimer_1 = SetTimer("tParkClose_1", 3500, 0);
gGateStatus[1] = 0;//открыто
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[1] == 0)
{
MoveObject(oPark,1360.5906, -1677.5801, 12.3291, 1.0);
MoveObject(oPark_1,1358.5400, -1677.5100, 18.1276, 3.0);
Parktimer_1 = SetTimer("tParkClose_1", 5000, 0);
gGateStatus[1] = 1;//закрыто
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускаеться!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 335)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[15]==0)
{
gGateStatus[15] = 1;
MoveObject(oPark1,1360.5908, -1677.2751, 15.8139, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Parktimer1 = SetTimer("tPark1Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[14]==0)
{
gGateStatus[14] = 1;
MoveObject(oPark1,1360.5908, -1677.2751, 15.8139, 1.0);
Parktimer11 = SetTimer("tPark11Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 336)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[1]==0)
{
gGateStatus[1] = 1;
MoveObject(oPark2,1360.5906, -1677.5801, 18.6891, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Parktimer2 = SetTimer("tPark2Close", 12000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[3]==0)
{
gGateStatus[3] = 1;
MoveObject(oPark2,1360.5906, -1677.5801, 18.6891, 1.0);
Parktimer22 = SetTimer("tPark22Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 337)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[4]==0)
{
gGateStatus[4] = 1;
MoveObject(oPark3,1360.5906, -1677.5801, 21.5812, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Parktimer3 = SetTimer("tPark3Close", 16000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[5]==0)
{
gGateStatus[5] = 1;
MoveObject(oPark3,1360.5906, -1677.5801, 21.5812, 1.0);
Parktimer33 = SetTimer("tPark33Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 338)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[6]==0)
{
gGateStatus[6] = 1;
MoveObject(oPark4,1360.5906, -1677.5801, 24.3786, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Parktimer4 = SetTimer("tPark4Close", 20000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[7]==0)
{
gGateStatus[7] = 1;
MoveObject(oPark4,1360.5905, -1677.6001, 24.3132, 1.0);
Parktimer44 = SetTimer("tPark44Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 339)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[8]==0)
{
gGateStatus[8] = 1;
MoveObject(oPark5,1360.5906, -1677.5801, 27.2532, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Parktimer5 = SetTimer("tPark5Close", 25000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[9]==0)
{
gGateStatus[9] = 1;
MoveObject(oPark5,1360.5906, -1677.5801, 27.2532, 1.0);
Parktimer55 = SetTimer("tPark55Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 340)
{ //ShowPlayerDialog(playerid,333,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,341,DIALOG_STYLE_LIST,"Park-Matik _1 stage_",listitems,"OK","Cancel");
}
else if(listitem == 1)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,342,DIALOG_STYLE_LIST,"Park-Matik _2 stage_",listitems,"OK","Cancel");
}
else if(listitem == 2)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,343,DIALOG_STYLE_LIST,"Park-Matik _3 stage_",listitems,"OK","Cancel");
}
else if(listitem == 3)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,344,DIALOG_STYLE_LIST,"Park-Matik _4 stage_",listitems,"OK","Cancel");
}
else if(listitem == 4)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,345,DIALOG_STYLE_LIST,"Park-Matik _5 stage_",listitems,"OK","Cancel");
}
else if(listitem == 5)
{
new listitems[] = "Поднять\
\nОпустить\
\nОткрыть/Закрыть ворота в парк-матик";
ShowPlayerDialog(playerid,346,DIALOG_STYLE_LIST,"Park-Matik _6 stage_",listitems,"OK","Cancel");
}
}
else
{
//gShowDialog[playerid] = 0;
}
TogglePlayerControllableEx(playerid, 1);
return 1;
}
else if(dialogid == 341)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[13] == 1)
{
MoveObject(oMatik,1364.8300, -1677.8300, 12.3100, 1.0);
MoveObject(oMatik_1,1362.9891, -1677.5344, 17.7569, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Matiktimer_1 = SetTimer("tMaikClose_1", 3500, 0);
gGateStatus[13] = 0;//открыто
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[13] == 0)
{
MoveObject(oMatik,1360.5906, -1677.5801, 12.3291, 1.0);
MoveObject(oMatik_1,1362.9891, -1677.5344, 17.7569, 3.0);
Matiktimer_1 = SetTimer("tMatikClose_1", 5000, 0);
gGateStatus[13] = 1;//закрыто
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускаеться!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 342)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[14]==0)
{
gGateStatus[14] = 1;
MoveObject(oMatik1,1360.5908, -1677.2751, 15.8139, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Matiktimer1 = SetTimer("tMatik1Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[15]==0)
{
gGateStatus[15] = 1;
MoveObject(oMatik1,1360.5908, -1677.2751, 15.8139, 1.0);
Matiktimer11 = SetTimer("tMatik11Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 343)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[16]==0)
{
gGateStatus[16] = 1;
MoveObject(oMatik2,1360.5906, -1677.5801, 18.6891, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Matiktimer2 = SetTimer("tMatik2Close", 12000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[17]==0)
{
gGateStatus[17] = 1;
MoveObject(oMatik2,1360.5906, -1677.5801, 18.6891, 1.0);
Matiktimer22 = SetTimer("tMatik22Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 344)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[18]==0)
{
gGateStatus[18] = 1;
MoveObject(oMatik3,1360.5906, -1677.5801, 21.5812, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Matiktimer3 = SetTimer("tMatik3Close", 12000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[19]==0)
{
gGateStatus[19] = 1;
MoveObject(oMatik3,1360.5906, -1677.5801, 21.5812, 1.0);
Matiktimer33 = SetTimer("tMatik33Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 345)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[20]==0)
{
gGateStatus[20] = 1;
MoveObject(oMatik4,1360.5906, -1677.5801, 24.3786, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Matiktimer4 = SetTimer("tMatik4Close", 14000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[21]==0)
{
gGateStatus[21] = 1;
MoveObject(oMatik4,1360.5905, -1677.6001, 24.3132, 1.0);
Matiktimer44 = SetTimer("tMatik44Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
else if(dialogid == 346)
{ //ShowPlayerDialog(playerid,33,DIALOG_STYLE_LIST,"TOG - список переключателей",listitems,"OK","Cancel");
if(response)
{
//gShowDialog[playerid] = 0;
if(listitem == 0)
{
if(gGateStatus[22]==0)
{
gGateStatus[22] = 1;
MoveObject(oMatik5,1360.5906, -1677.5801, 27.2532, 1.0);
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
MoveObject(oPark_Matik,1360.4728, -1673.3136, 14.1741, 1.0);
Matiktimer5 = SetTimer("tMatik5Close", 15000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа поднимаетыся на своё место!");
return 1;
}
return 1;
}
else if(listitem == 1)
{
if(gGateStatus[23]==0)
{
gGateStatus[23] = 1;
MoveObject(oMatik5,1360.5906, -1677.5801, 27.2532, 1.0);
Matiktimer55 = SetTimer("tMatik55Close", 5000, 0);
SendClientMessage(playerid, COLOR_YELLOW,"Платформа опускается!");
return 1;
}
return 1;
}
else if(listitem == 2)
{
if(gGateStatus[11] == 0)
{
MoveObject(oPark_Matik2,1359.4854, -1664.4935, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 1;//открыто
return 1;
}
else
{
MoveObject(oPark_Matik2,1364.3604, -1664.4230, 12.7648, 1.0);
PlaySoundForObject(oPark_Matik2, 1165);//1035
gGateStatus[11] = 0;//закрыто
return 1;
}
}
}
else
{
//gShowDialog[playerid] = 0;
}
return 1;
}
PHP:
public tParkClose_1()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark_1, 1358.5400, -1677.5100, 13.9800, 1.0);//закрываем
MoveObject(oPark_Matik,1360.4728, -1673.3136, 17.4867, 1.0);
KillTimer(Parktimer_1);
gGateStatus[10] = 0;
return 1;
}
public tPark1Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark1, 1356.4301, -1677.5500, 15.8100, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Parktimer1);
gGateStatus[14] = 0;
return 1;
}
public tPark11Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark1, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Parktimer11);
gGateStatus[15] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 10.0);
atimer = SetTimer("taClose", 5000, 0);
return 1;
}
public tPark2Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark2, 1356.4301, -1677.5500, 18.7400, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Parktimer2);
gGateStatus[2] = 0;
return 1;
}
public tPark22Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark2, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Parktimer22);
gGateStatus[3] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 2.5);
atimer = SetTimer("taClose", 15000, 0);
return 1;
}
public tPark3Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark3, 1356.4301, -1677.5500, 21.6100, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Parktimer3);
gGateStatus[4] = 0;
return 1;
}
public tPark33Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark3, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Parktimer33);
gGateStatus[5] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 2.0);
atimer = SetTimer("taClose", 10000, 0);
return 1;
}
public tPark4Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark4, 1356.4301, -1677.5500, 24.4200, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Parktimer4);
gGateStatus[6] = 0;
return 1;
}
public tPark44Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark4, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Parktimer44);
gGateStatus[6] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 1.5);
atimer = SetTimer("taClose", 15000, 0);
return 1;
}
public tPark5Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark5, 1356.4301, -1677.5699, 27.3200, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Parktimer5);
gGateStatus[7] = 0;
return 1;
}
public tPark55Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark5, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Parktimer55);
gGateStatus[8] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 0.5);
atimer = SetTimer("taClose", 15000, 0);
return 1;
}
public tMatikClose_1()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik_1, 1362.9891, -1677.5344, 13.9500, 1.0);//закрываем
MoveObject(oPark_Matik,1360.4728, -1673.3136, 17.4867, 1.0);
KillTimer(Matiktimer_1);
gGateStatus[13] = 0;
return 1;
}
public tMatik1Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik1, 1364.7200, -1677.6000, 15.8100, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Matiktimer1);
gGateStatus[14] = 0;
return 1;
}
public tMatik11Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik1, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Matiktimer11);
gGateStatus[15] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 8.0);
atimer = SetTimer("taClose", 5000, 0);
return 1;
}
public tMatik2Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik2, 1364.7200, -1677.6000, 18.7400, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Matiktimer2);
gGateStatus[16] = 0;
return 1;
}
public tMatik22Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik2, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Matiktimer22);
gGateStatus[17] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 3.0);
atimer = SetTimer("taClose", 15000, 0);
return 1;
}
public tMatik3Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik3, 1364.7200, -1677.6000, 21.6100, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Matiktimer3);
gGateStatus[18] = 0;
return 1;
}
public tMatik33Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik3, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Matiktimer33);
gGateStatus[19] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 4.0);
atimer = SetTimer("taClose", 15000, 0);
return 1;
}
public tMatik4Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik4, 1364.7200, -1677.6000, 24.4200, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Matiktimer4);
gGateStatus[20] = 0;
return 1;
}
public tMatik44Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik4, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Matiktimer44);
gGateStatus[21] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 1.5);
atimer = SetTimer("taClose", 15000, 0);
return 1;
}
public tMatik5Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik5, 1364.7200, -1677.6000, 27.3200, 1.0);//закрываем
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
KillTimer(Matiktimer5);
gGateStatus[22] = 0;
return 1;
}
public tMatik55Close()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oMatik5, 1360.5905, -1677.6001, 12.3447, 1.0);//закрываем
KillTimer(Matiktimer55);
gGateStatus[23] = 0;
MoveObject(oPark_Matik1,1364.7200, -1677.6000, 15.8100, 0.5);
atimer = SetTimer("taClose", 15000, 0);
return 1;
}
public taClose()//запускается через 5 секунд 1 раз по команде /gate
{
MoveObject(oPark_Matik1, 1360.5825, -1677.8014, 15.6967, 1.0);//закрываем
MoveObject(oPark_Matik,1360.4728, -1673.3136, 17.4867, 1.0);
KillTimer(atimer);
PlaySoundForObject(oPark_Matik, 1165);//1035
gGateStatus[12] = 0;
return 1;
}
Последнее редактирование:
