Рекомендованные сообщения



Не найдено.

11 posts in this topic

Добрый день 

Подскажите из за чего поезд стоит как вкопанный в землю? Создаю всё правильно 

AddStaticVehicle(537,2410.9673,2690.1250,12.1256,90.0000,1,1);

Вот видео: https://youtu.be/_zDw7UGonFY
P.S: забыл в записи поставить звук из игры что-бы было слышно что он пытается ехать но не может

Share this post


Link to post
Share on other sites

@MuhammadPawn так он не заведен скорее всего. По звукам может быть все, что угодно. Темболее поезд отдельный класс транспорта в ГТА, и возможно, что с ним есть какие-то баги в плане звука. Попробуй завести функцией SetVehicleParamsEx и все должно получиться. 

Он вроде даже если просто на рельсях стоит уже гудит. (в крмп по крайней мере точно так, в САМП не знаю)

Share this post


Link to post
Share on other sites

@DEST попробовал завести его

new poezd = AddStaticVehicle(537,2410.9673,2690.1250,12.1256,90.0000,1,1);
SetVehicleParamsEx(poezd, VEHICLE_PARAMS_ON, -1, -1, -1, -1, -1, -1);

ему всё равно

Share this post


Link to post
Share on other sites

Тогда мы столкнулись со случаем магии вне Хогвартса. Ждём Дамблдора для разбирательств.

Share this post


Link to post
Share on other sites

Даже ради прикола засуну в чистый new.pwn (вдруг чёт я у себя в моде сотворил чё не едит) но ему как-то.

Заметил прикол 1 если его заставить ехать с читом то он резко тормозит 

Share this post


Link to post
Share on other sites
4 часа назад, MuhammadPawn сказал:

Даже ради прикола засуну в чистый new.pwn (вдруг чёт я у себя в моде сотворил чё не едит) но ему как-то.

 

так в чистом моде едет или нет? 

По-моему, SetVehicleVelocity неприменимо на поезда, но может я чего-то уже позабыл. 

Share this post


Link to post
Share on other sites

@DEST В чистом тоже не едит... 

SetVehicleVelocity я не юзаю

Share this post


Link to post
Share on other sites

@MuhammadPawn я думаю за долгие годы существования SAMP уже бы заметили, что поезда не ездят. Тут явно у тебя какие-то траблы. Попробуй зайти на другой онлайн сервер, на Аризоне по-моему бот ездит поезда

Share this post


Link to post
Share on other sites

@DEST так я его создаю как на wiki пример дали

AddStaticVehicle(537,2384.8577, 2690.2144, 12.6096, 90.0000,1,1);

почему работать не хочет хз (даже в чистом моде где не чего нет) 

new.pwn

Edited by MuhammadPawn

Share this post


Link to post
Share on other sites

@MuhammadPawn у себя протестил все работает, может у тебя проблемы с ГТА какие-нибудь? 

https://www.youtube.com/watch?v=bm7T-6zH0RA&feature=youtu.be

Share this post


Link to post
Share on other sites

Попробую щас гта и самп переустановить 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • F0urdeuces
      By F0urdeuces
      Всем привет , как сделать чтобы в парковку только мог человек с определяемой фракцией
      if (newkeys & KEY_HORN && IsPlayerInAnyVehicle(playerid)) { new carid = GetPlayerVehicleID(playerid); if(ParkingEntered[playerid] == -1) { for(new i;i<MAX_PARKING;i++) { if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z])) { ShowPlayerDialogEx(playerid, 1981, DIALOG_STYLE_LIST, !"{BDBAB5}Выберите этаж!", "{FFFFFF}1.\n2.", "Принять", "Отмена"); } if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pExit_x],parking[i][pExit_y],parking[i][pExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered[playerid] = -1; return true; } } } else { new i = ParkingEntered[playerid]; if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pExit_x],parking[i][pExit_y],parking[i][pExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered[playerid] = -1; return true; } else { if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pVExit_x],parking[i][pVExit_y],parking[i][pVExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered [playerid] = -1; return true; } } } } else if(PRESSED(KEY_WALK) && !IsPlayerInAnyVehicle(playerid)) { new carid = GetPlayerVehicleID(playerid); if(ParkingEntered[playerid] == -1) { for(new i;i<MAX_PARKING;i++) { if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z])) { ShowPlayerDialogEx(playerid, 1981, DIALOG_STYLE_LIST, !"{BDBAB5}Выберите этаж!", "{FFFFFF}1.\n2.", "Принять", "Отмена"); } if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pExit_x],parking[i][pExit_y],parking[i][pExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered[playerid] = -1; return true; } } } else { new i = ParkingEntered[playerid]; if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pExit_x],parking[i][pExit_y],parking[i][pExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered[playerid] = -1; return true; } else { if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pVExit_x],parking[i][pVExit_y],parking[i][pVExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered [playerid] = -1; return true; } } } } else if(PRESSED(KEY_WALK) && !IsPlayerInAnyVehicle(playerid)) { new carid = GetPlayerVehicleID(playerid); if(ParkingEntered[playerid] == -1) { for(new i;i<MAX_PARKING;i++) { if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z])) { ShowPlayerDialogEx(playerid, 1981, DIALOG_STYLE_LIST, !"{BDBAB5}Выберите этаж!", "{FFFFFF}1.\n2.", "Принять", "Отмена"); } if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pExit_x],parking[i][pExit_y],parking[i][pExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered[playerid] = -1; return 1; } } } else { new i = ParkingEntered[playerid]; if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pExit_x],parking[i][pExit_y],parking[i][pExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered[playerid] = -1; return 1; } else { if(IsPlayerInRangeOfPoint(playerid, 3, parking[i][pVExit_x],parking[i][pVExit_y],parking[i][pVExit_z])) { if(GetPlayerState(playerid) == 2) { J_SetVehiclePos(carid,parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); SetVehicleZAngle(carid,parking[i][pEnter_a]); LinkVehicleToInterior(carid, 0); SetVehicleVirtualWorld(carid, 0); } else { J_SetPlayerPosFreeze(playerid, parking[i][pEnter_x],parking[i][pEnter_y],parking[i][pEnter_z]); J_SetPlayerFacingAngle(playerid, parking[i][pEnter_a]); } SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); ParkingEntered [playerid] = -1; return 1; } } } } enum parkinginfo { Float:pEnter_x, Float:pEnter_y, Float:pEnter_z, Float:pEnter_a, pVWorld, Float:pExit_x, Float:pExit_y, Float:pExit_z, Float:pExit_a, Float:pVExit_x, Float:pVExit_y, Float:pVExit_z, Float:pVExit_a, }; //pEnter_x pEnter_y pEnter_z (Точки с которых заезжает в паркинг, pEnter_a поворот перса/автомобиля) //pExit_x pExit_y pExit_z ((pExit_a поворот перса/автомобиля)Точки с которых выезжает из паркинга на точки pEnter_x pEnter_y pEnter_z) //pVWorld (Вирт.Мир авто/игрока) //pVExit_x, pVExit_y, pVExit_z, pVExit_a тоже самое что и pEnter_x pEnter_y pEnter_z, только на второй этаж new parking[MAX_PARKING][parkinginfo] = { {774.6982,1651.0575,12.0073,357.5273, 1, 1017.3782,1005.9407,998.4375, 271.0465, 2496.8066,2343.3479,1502.3184,87.2872}, {1814.3567, -1877.0453, 13.5781, 3.1156, 2, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-78.3442,1180.6338,19.4433,178.3271, 3, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {2811.5740,1235.1237,10.4653,88.9500, 5, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {2650.6873,1181.1444,10.8203,91.8699, 6, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1790.0857,418.0161,19.9621,86.8489, 7, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1504.7184,-1325.3362,13.7060,271.2840, 8, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1436.8799,-1578.2943,13.2682,1.1519, 9, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1637.1638,-1684.8743,13.2173,93.0377, 10, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1403.2896,-1652.7843,13.1607,271.2161, 11, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1283.7948,-1349.4983,13.1657,3.1795, 12, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1175.3805,-1308.6919,13.6326,269.0903, 13, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {340.4299,-1618.8706,32.7566,179.5325, 14, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {611.8994,-1348.3763,13.4575,279.0285, 15, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {167.3457,-183.4712,1.3028,269.8813, 16, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-1991.2229,235.8233,28.6959,91.8888, 18, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2099.6377,-52.8561,35.0399,181.8297, 19, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2079.7205,-54.8950,34.9738,0.5623, 20, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2153.8198,277.4999,35.0464,181.6078, 21, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2443.9368,523.5727,29.9163,181.6118, 22, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-1967.0040,548.9451,34.8768,90.3882, 23, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2565.8049,556.1598,14.1902,269.6837, 24, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2627.1423,627.0738,14.1298,181.6917, 25, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2730.2429,75.1695,4.0616,271.5603, 26, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-1994.6035,-1032.1533,31.8478,359.2426, 27, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1613.7208,1721.5741,10.5646,265.7845, 28, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {2201.0083,2411.4814,10.4901,177.4481, 29, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {2255.9700,-1135.6167,26.4331,246.4052, 30, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {2248.2683,-1726.0171,13.2362,268.7718, 31, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {2773.5608,-1649.4165,11.4144,270.2876, 32, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2123.9248,-2295.5845,30.3705,142.9485, 33, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2443.9199,105.2780,34.8502,258.0834, 34, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1446.2391,2816.8208,10.5487,271.3440, 35, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {946.8265,1660.0414,8.3660,268.2236, 36, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {-2456.6633,2292.8625,4.7045,1.0456, 37, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1156.6422,-1627.2762,13.6746,0.0072, 38, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {2758.7075,-2365.7222,13.6328,93.9539, 38, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872}, {1798.8214,-1442.1119,13.4887,1.6389, 39, 1017.3782,1005.9407,998.4375, 271.0465,2496.8066,2343.3479,1502.3184,87.2872} };