Jump to content

dima3367

Members
  • Posts

    67
  • Joined

  • Last visited

Everything posted by dima3367

  1. To be honest, I'm not sure if it is there. Since I can not really understand exactly what caused the problem that the collision occurs periodically. Do not see, but as it turns out that they are facing and do not pass through each other. (Somewhere in the middle as if faced), but after a while everything becomes fine.
  2. Hello! I have a system for freeroam in which the machines models disappears collision. It seems to be working properly, but there is one problem, sometimes a conflict as if the car appears and face, I suspect that this is due to the fact that the other player off collision, and at first it appears. Just does not always work this system. For example, the player has pressed "disable conflict" and the other player's collision is still displayed. Checkbox course made. Could you check the code? Client: local ghostAvail = false function toggleVehicleGhost() if guiCheckBoxGetSelected(getControl(wndMain, 'anticol')) then outputChatBox("Теперь ваш автомобиль не будет сталкиваться с другими автомобилями.",150,255,150) ghostAvail = true setElementData ( g_Me, "freeroam:ghost", true ) local veh = getPedOccupiedVehicle ( g_Me ) if veh and getPedOccupiedVehicleSeat (g_Me) == 0 then for i, v in ipairs ( getElementsByType ("vehicle", true) ) do if veh ~= v then setElementCollidableWith ( veh, v, false ) end end end else outputChatBox("Теперь ваш автомобиль будет сталкиваться с другими автомобилями.",250,150,150) setElementData ( g_Me, "freeroam:ghost", false ) ghostAvail = false local veh = getPedOccupiedVehicle ( g_Me ) if veh and getPedOccupiedVehicleSeat (g_Me) == 0 then for i, v in ipairs ( getElementsByType ("vehicle", true) ) do if veh ~= v then local occupant = getVehicleOccupant (veh) if not occupant or not getElementData (occupant,"freeroam:ghost") then setElementCollidableWith ( veh, v, true ) end end end end end end function onStreamIn ( ) local veh = getPedOccupiedVehicle ( g_Me ) if veh then if getElementType ( source ) == "vehicle" then local occupant = getVehicleOccupant (veh) if isElementCollidableWith ( veh, source ) then if ghostAvail or ( occupant and getElementData ( occupant, "freeroam:ghost" ) and getPedOccupiedVehicleSeat (occupant) == 0 ) then setElementCollidableWith ( veh, source, false ) end else if not ghostAvail or ( occupant and not getElementData ( occupant, "freeroam:ghost" ) ) then setElementCollidableWith ( veh, source, true ) end end end end end addEventHandler ( "onClientElementStreamIn", root, onStreamIn ) function checkPlayersGhosts (dataName) if getElementType ( source ) == "player" and dataName == "freeroam:ghost" and source ~= localPlayer then local veh = getPedOccupiedVehicle ( source ) local localVeh = getPedOccupiedVehicle ( g_Me ) if veh and getPedOccupiedVehicleSeat (source) == 0 and isElementStreamedIn (veh) then local newValue = getElementData ( source, dataName ) if newValue then for i, v in ipairs ( getElementsByType ("vehicle", true) ) do if veh ~= v then setElementCollidableWith ( veh, v, false ) end end else for i, v in ipairs ( getElementsByType ("vehicle", true) ) do if veh ~= localVeh then setElementCollidableWith ( veh, v, true ) else if not ghostAvail then setElementCollidableWith ( veh, v, true ) end end end end end end end addEventHandler ( "onClientElementDataChange", getRootElement(), checkPlayersGhosts ) addEventHandler("onClientVehicleEnter", getRootElement(), function(thePlayer, seat) -- if thePlayer ~= getLocalPlayer() then if seat == 0 then if getElementData (thePlayer,"freeroam:ghost") then -- local localVeh = getPedOccupiedVehicle ( g_Me ) -- if localVeh and localVeh ~= source then for i, v in ipairs ( getElementsByType ("vehicle", true) ) do if source ~= v then setElementCollidableWith ( source, v, false ) end end -- end end end -- end end ) addEventHandler("onClientVehicleExit", getRootElement(), function(thePlayer, seat) -- if thePlayer ~= getLocalPlayer() then if seat == 0 then -- local localVeh = getPedOccupiedVehicle ( g_Me ) -- if localVeh and localVeh ~= source then if getElementData (thePlayer,"freeroam:ghost") then for i, v in ipairs ( getElementsByType ("vehicle", true) ) do if source ~= localVeh then setElementCollidableWith ( source, v, true ) else if not ghostAvail then setElementCollidableWith ( source, v, true ) end end end end end -- end end ) Thanks in advance and I apologize for my bad English.
  3. What can you say about it?
  4. It is perfectly. But you're mine I do not fully understand. I have models of cars are replaced. That is their DFF and TCD go to cash to the player. I need to make sure that they were in the cache, but as it were coded, what would they had not been able to edit programs. Here's how to replace a model Client: function replaceModel() txd = engineLoadTXD('file.txd',420) engineImportTXD(txd,420) dff = engineLoadDFF('file.dff',420) engineReplaceModel(dff,420) end addEventHandler ( 'onClientResourceStart', getResourceRootElement(getThisResource()), replaceModel)
  5. I do not understand one, the server itself can open files in order that they could see the players?
  6. I not really understand how to use it Click Could you elaborate on this?
  7. Hello everyone! Me again. For your server doing exceptionally unique models of machines and facilities, but there are "good" people who brazenly steal them from the server is removed from the cache. Previously, I used protection when a DFF and TXD file encoded in any way LUAC and they can not be opened. Since a lot of models and objects (approximately 1300 MB), the server load became wildly and many players disappearing textures and were hovering. I know that there is a fairly simple way in which you can not open the file TXD. Tell me, how is it possible to do. I hope you understand what I mean. Thanks in advance and sorry for my bad english.
  8. Thank you very much for your help, everything turned out! Keep my likes to your posts!
  9. <div id="inner-editor"></div> the player will still take damage
  10. Hello everybody! I did the prison system. But players can get out of it if you die. I did this test here of the fact that the player would not receive damage: function onDmg() if getElementData(source,'_inJail') == true then cancelEvent() end end addEventHandler('onPlayerDamage',root,onDmg) But the player still takes damage from another player How to fix it? Sorry for my bad english
  11. dima3367

    Winter Mod

    Hello! It's me again. I do winter mod for GTA SA Map So I ordered all textures like this (Example): function onResourceStart() noname1 = engineLoadTXD ('lodlawnsmall.txd') engineImportTXD (noname1, 5839) end addEventHandler('onClientResourceStart', getResourceRootElement(getThisResource()), onResourceStart) But now there was one thing, but a very serious problem. Game start progruzhat as if the whole world at once! Because of this, players with slower computers will lag the wild, as well as the texture will disappear. How to be, what you can do that the whole world does not progruzhat right? And also tell me how can I do so that the texture defaul were off and command /snow, for example, the texture of snow included. Why I did not use shaders? Unfortunately they are very much in conflict with the models of my machines on a server, and the players are very often used for ENB beautiful screenshots and activation ENB Shaders disappear. What should I do not know, but really wants to have the winter Thank you in advance for your cooperation! Sorry for my bad English.
  12. Could you make an example of being at the computer?
  13. Hello! Do winter mod for GTA SA card has all the texture maps converted before winter. I prescribe them like this: function onResourceStart() noname1 = engineLoadTXD ('des_nw.txd') engineImportTXD (noname1, 11429) end addEventHandler('onClientResourceStart', getResourceRootElement(getThisResource()), onResourceStart) This is a very difficult and long. Whether it is possible to do anything faster? Perhaps there is another way? Thank you in advance! And sorry for my bad english
  14. Hello everyone! I represent the Russian-speaking server in MTA with the theme of drift. I want to immediately apologize for my bad English. The server as I said is a drift server. Drift Russian cars, the so-called military classic. Links and IP addresses will not be attached so there was no advertising. We have been developing a server for 2 years and has achieved no small results, both in developing and online. But we had the idea to do so to a unique server, but for the implementation we do not have enough time and effort. We began developing and moving away from freeroam mode. We want to make a server with tuning cars. That means the player will be a regular flow of the car VAZ which he will be able to pump on its own. Add different body kits, to install or remove details, add stickers and stuff. The beginning is made. We gave the players the ability to add and remove the elements of tuning, from bumpers to mirrors. Players can remove parts, for example the front fenders. But further work is progressing is not much, since we cannot make players the opportunity to add vinyls and decals. We are looking for a developer willing to help. Need someone interested in this and are willing to work for free. Later when I start my server willing to give a certain percentage of sales. There are many ideas and all we can tell you if you are really interested. If you are interested, you can write me on mail: [email protected] -------- Привет всем! Я представляю русскоязычный сервер в МТА с темой дрифта. Я хочу сразу извиниться за мой плохой английский. Сервер, как я уже сказал-это сервер дрифт. Дрифт русских машин, так называемый военный классик. Ссылки и IP-адреса не будет, так что не было никакой рекламы. Мы разрабатываем сервер 2 года и добился не малых результатов, как в развивающихся, так и онлайн. Но у нас появилась идея сделать так, чтобы уникальный сервер, но для реализации нам не хватает времени и сил. Мы начали разработку и отойдя от freeroam режиме. Мы хотим сделать сервер с тюнингом автомобилей. Это означает, что игрок будет регулярный поток автомобилей ВАЗ, которые он сможет прокачивать по-своему. Добавить различные обвесы, установить или удалить детали, добавить наклейки и прочее. Начало сделано. Мы дали игрокам возможность добавлять и удалять элементы тюнинга, от бамперов до зеркал. Игроки могут удалить запчастей, например передних крыльях. Но в дальнейшем работа продвигается не так много, поскольку мы не можем сделать игрокам возможность добавить винилы и наклейки. Мы ищем разработчика, готового помочь. Нужен кто-то, заинтересованы в этом и готовы работать бесплатно. Позже, когда я запустить мой сервер готов отдать определенный процент от продажи. Есть много идей, и все, что мы можем сказать вам, если вы действительно заинтересованы. Если вы заинтересованы, вы можете написать мне на почту: [email protected]
  15. Greetings to all! I had such a problem. Previously, this was not. Subjects server is drifting on which establishment of some models. Sometimes players proihodit here that: Players gather in one place, then the player creates for example a different model and because of the strong players nachiyutsya prosidanie FPS which eventually led to the departure of the client or by injection after the models have not progruzhat of the parts, wheels, and other salons. What could it be? He began to slowly ease the model, but it does not help. In terms of the script all right, no errors. Please tell me and help. I ask the administration to move the topic if it is created in a different theme. That IP address to connect and check: 46.174.50.46:22045
  16. Hello! Tell me how can I do so that would be hiding sided radar. That is, I have installed scripts that zamenet standratny radar and pressing to hide all the radar is not hidden, how do I fix it?
  17. Good day. Please tell me how to do so that would be the team that I create through the admin panel is not disappearing after a restart? And they kept the players who are in them? thanks in advance
  18. dima3367

    Car tuning

    and here Bind button? I'm talking about that as I do for standard cars GTA San Andreas settings? I mean, maybe that has something to do with the script hedit? or need a separate script?
  19. dima3367

    Car tuning

    I read it, but did not understand how to apply it. I have installed on the server script hedit necessary as that is possible for him to use it?
  20. dima3367

    Car tuning

    can you tell us more?
  21. dima3367

    Car tuning

    Hey there! I drift server and on some servers I've seen that on standard machines already preset tuning drift, please tell me how to do it! Thanks in advance!
  22. why here "addBan" I need to just if the player drive the machine on a marker that was not teleported
  23. Hi all, tell me how to make my script ban on teleportation in the car and make it dosutpnoy only when the player is on foot. local marker = createMarker(-1556.1298828125,-530.66552734375,13.1484375,"cylinder",1.5,230,0,85,225) -- это будет маркер в обычном мире, т.е. в нулевом измерении addEventHandler("onMarkerHit",marker, function (hitElement, matchingDimension) if getElementType (hitElement) == 'player' and matchingDimension then setElementPosition (hitElement,-3037.6647949219,1605.0709228516,39.676563262939) setElementDimension (hitElement, 500) end end) local markerD = createMarker(-3028.0424804688,1649.7550048828,38.817188262939,"cylinder",1.5,230,0,85,225) -- это уже будет маркер в другом измерении setElementDimension (markerD, 500) -- 5 - ид измерения addEventHandler("onMarkerHit",markerD, function (hitElement, matchingDimension) if getElementType (hitElement) == 'player' and matchingDimension then setElementPosition (hitElement,-1512.4594726563,-517.94372558594,14.1484375) setElementDimension (hitElement, 0) end end)
×
×
  • Create New...