//--42
if(IsPlayerInRangeOfPoint(playerid, 2.0, 603.5004,-393.3282,10.0469) || IsPlayerInRangeOfPoint(playerid, 2.0, 603.5004,-393.3282,10.0469))
{
ClearAnimations(playerid);
if(GetPlayerHouse(playerid) == 42)
{
if(vorota_status == 0)
{
MoveDynamicObject(vorota_sosnovie1,600.985839, -397.980590, 9.086875,1.0, 0.000000, 0.000000, 65.400032);//ìåíÿåøü êîîðäèíàòû íà îòêðûòèå êàæäóþ èç ñòîðîí âîðîò, ïîñëå çíà÷åíèÿ z ñòàâèøü 1.0, ýòî ñêîðîñòü îòêðûâàíèÿ
MoveDynamicObject(vorota_sosnovie2,604.885009, -388.180328, 9.086875,1.0, 0.000000, 0.000000, -102.100013);
SendClientMessage(playerid, -1, "Âû îòêðûëè âîðîòà ñâîåãî äîìà.");
vorota_status = 1;
return 1;
}
else
{
MoveDynamicObject(vorota_sosnovie1,602.138061, -395.461547, 9.086875,1.0, 0.000000, 0.000000, 65.400032);
MoveDynamicObject(vorota_sosnovie2,604.252502, -390.902954, 9.086875,1.0, 0.000000, 0.000000, -115.499931);
SendClientMessage(playerid, -1, "Âû çàêðûëè âîðîòà ñâîåãî äîìà.");
vorota_status = 0;
return 1;
}
}
else
{
SendClientMessage(playerid, -1, "Âû íå âëàäåëåö ýòîãî äîìà");
return 1;
}
}