Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //Позиция центра карты
- #define POS_X 1798.6000
- #define POS_Y -1881.6550
- #define POS_Z 14.3381
- new mtimer;
- new bus[6];
- new point[6];
- forward UpdateMap();
- public OnFilterScriptInit()
- {
- print("Карта by mihan-888");
- //Сама карта
- CreateObject(19168, 1797.8475, -1881.6311, 15.0892, 90.00, 0.00, 0.00);
- CreateObject(19169, 1799.3453, -1881.6311, 15.0892, 90.00, 0.00, 0.00);
- CreateObject(19170, 1797.8475, -1881.6311, 13.5896, 90.00, 0.00, 0.00);
- CreateObject(19171, 1799.3472, -1881.6311, 13.5896, 90.00, 0.00, 0.00);
- //Фонарики
- CreateObject(19280, 1799.7864, -1881.6339, 15.8763, 180.00, 180.00, 0.00);
- CreateObject(19280, 1797.4865, -1881.6339, 15.8763, 180.00, 180.00, 0.00);
- //Таймер
- mtimer = SetTimer("UpdateMap", 4000, true);
- //Автобусы
- bus[0] = CreateVehicle(431,2849.6064453,1348.8885498,11.0616951,90.0000000,-1,-1,1500); //Bus
- bus[1] = CreateVehicle(431,211.1277924,1921.1492920,17.8906250,90.0000000,-1,-1,1500); //Bus
- bus[2] = CreateVehicle(431,-2645.8889160,1371.4929199,7.4176097,0.0000000,-1,-1,1500); //Bus
- bus[3] = CreateVehicle(431,-1995.4799805,146.8946838,27.9298630,0.0000000,-1,-1,1500); //Bus
- bus[4] = CreateVehicle(431,1774.5667725,-1922.8370361,13.6353350,0.0000000,-1,-1,1500); //Bus
- bus[5] = CreateVehicle(431,1807.1064453,-1921.8720703,13.8133907,0.0000000,-1,-1,1500); //Bus
- //Метки
- for(new i = 0; i < 6; i++) point[i] = CreateObject(19177, POS_X, POS_Y, POS_Z, 90.00, 0.0, 0.0);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(mtimer);
- return 1;
- }
- public UpdateMap()
- {
- for(new i = 0; i < 6; i++)
- {
- new Float:vehx, Float:vehy, Float:vehz;
- new Float:nvehx, Float:nvehy, Float:nvehz;
- GetVehiclePos(bus[i], vehx, vehy, vehz);
- GetMiniMapCoord(vehx,vehy,nvehx,nvehy,nvehz);
- MoveObject(point[i], nvehx, nvehy, nvehz, 0.1, 90.0, 0.0, 0.0);
- }
- }
- stock GetMiniMapCoord(Float:x,Float:y,&Float:nx,&Float:ny,&Float:nz)
- {//x,y - реальные координаты, nx,ny,nz - позиция на мини-карте
- nx = x/2000;
- nz = y/2000;
- ny = POS_Y;
- nx+=POS_X;
- nz+=POS_Z;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement