#include forward TIMER_PlayerArea(); forward OnPlayerEnterArea(playerid,areaid); forward OnPlayerLeaveArea(playerid,areaid); //------------------------------------------------------------------------------------------------------ public OnGameModeInit() { garazpd = AddAreaCheck(-1640.1406,-1623.8275,681.5294,697.5279,0,0); SetTimer("TIMER_PlayerArea",1000,true); // OBJEKTY garazpd1 = CreateObject(16775, -1630.606934, 688.114075, 9.811722, 0, 0, 0); // Policie - garaz garazpd2 = CreateObject(16775, -1645.236572, 688.127869, 9.846436, 0, 0, 0); // Policie - garaz2 return 1; } //------------------------------------------------------------------------------------------------------ public OnPlayerEnterArea(playerid,areaid) { if (areaid==garazpd) MoveObject(garazpd1, -1630.606934, 688.114075, 14.661663, 2); MoveObject(garazpd2, -1645.236572, 688.127869, 50, 2); } public OnPlayerLeaveArea(playerid,areaid) { if (areaid==garazpd) MoveObject(garazpd1, -1630.606934, 688.114075, 9.811722, 2); MoveObject(garazpd2, -1645.236572, 688.127869, 9.846436, 2); } // garazpd1,2 = garage doors