Jump to content

httpRick

Members
  • Posts

    5
  • Joined

  • Last visited

About httpRick

  • Birthday 07/11/1997

Details

  • Gang
    None
  • Location
    Poland
  • Occupation
    Writing the code
  • Interests
    programming, technology, anime

Recent Profile Visitors

1,087 profile views

httpRick's Achievements

Vic

Vic (3/54)

1

Reputation

  1. Please add when ElementData is removed then let it restore the original model Test Code Server Side: for i=1,20 do local ped = createPed(0, 0+i, 0, 5) setTimer(function() if ped then local data_name = exports.newmodels:getDataNameFromType("ped") if hasElementData(ped, data_name) then removeElementData(ped, data_name) else local skin = math.random(20001, 20003) setElementData(ped, data_name, skin) end end end, 500, 0) end Please add when ElementData is removed then let it restore the original model
  2. Compiler A simple-to-use resource that can be exported both on the client side and on the server side. consisting in the encryption/decryption of files Wikipedia: https://wiki.multitheftauto.com/wiki/Resource:Compiler Download Compiler: https://github.com/httpRick/Compiler Screenshoot:
  3. Hi, I want to introduce you to a project in the MTA System Mission to the very beginning has only one mission but rather an advanced've worked about 3 weeks. As the title suggests it will be a system to perform certain mission. Why Missions in MultiPlayer? Multiple servers offers only a few monotonous type of work come from the point (A to B) and that ends the work, without any diversions. Procedure: Each mission run as Grand Theft Auto San Andreas entering the vehicle and pressing the number 2 on the keyboard. Specification of the Mission: 1. Paramedic: Convenient and easy configuration file "config" The ability to perform missions using the Emergency The NPC intelligence [AI] (avoiding obstacles, to detect the optimal route to the door, searching for the nearest door) The entire fully optimized The search paths and random placement on their bots The locking formation bots in the absence of a path, and if the path is on the water. Sometimes referred to in minutes and seconds, and the system of adding time level system The intelligent payment The selection of the nearest hospital The collision and subtraction health NPC Many text messages about (Full Ambulance, Cancellation of the Mission, not the success of the mission, to rescue, to allocate time) Support for the language: German English Polish Planned The radio communications Medical Center in the form of votes SFX Support for the Russian language Support for Spanish language Adding recording of Level Player in the case of restart script. Adding realistic entering and exiting the vehicle for NPC Detected at the moment error: NPC in case you pass and deceleration to 0 boarded and then kills himself in the ambulance (in for repairs) The texts do not change rapidly after a quick change of language when viewing the current statement in the previous language (Recognition of error) Project after the publication will be released under the GPL V3 and in accordance with the requirements of the license code will be published on the principle of open source. Presentation:
  4. Witam chcę przedstawić wam pewien projekt Systemu Misji w MTA na sam początek posiada tylko jedna Misje ale dość zawansowaną nad którą pracowałem jakieś 3 tygodnie. Tak jak tytuł wskazuje będzię to System wykonywania określonych Misji. Po co Misje w MultiPlayer? Wiele serwerów oferuje jedynie parę monotonnych prac typu przyjedź od punktu (A do B) i na tym kończy się praca, bez żadnych urozmaiceń. Sposób działania: Każdą misję uruchamiamy jak w Grand Theft Auto San Andreas wchodząc do pojazdu i naciskając liczbę 2 na klawiaturze. Specyfikacja danej Misji: 1. Sanitariusz: Wygodna i łatwa konfiguracja w pliku "config" Możliwość wykonywania misji za pomocą Ambulansu System inteligencji NPC [AI] (omijanie przeszkód, wykrywanie optymalnej trasy do drzwi, wyszukiwanie najbliższych drzwi) Całość w pełni zoptymalizowana System wyszukiwania ścieżek oraz losowego rozmieszczania na nich botów Funkcja blokująca tworzenie botów w przypadku braku ścieżki oraz jeśli ścieżka znajduje się na wodzie. Czas okreslany w minutach i sekundach oraz system dodawania czasu System poziomów System inteligentnej wypłaty System wybierania najbliższego szpitala Funkcja kolizji i odejmowania zdrowia NPC Wiele komunikatów tekstowych odnośnie (Pełnego Ambulansu, Anulowania Misji, Nie powodzenia misji, Uratowania, przydzielenia czasu) Wsparcie dla języka: Niemieckiego Angielskiego Polskiego Planowany: System komunikatów radiowych Medical Center w postaci głosów SFX Wsparcie dla języka Rosyjskiego Wsparcie dla języka Hiszpańskiego Dodanie zapisu stanu Levelu gracza w przypadku restartu skryptu. Dodanie realistycznego wchodzenia oraz wychodzenia z pojazdu dla NPC Wykryte na obecną chwilę błędy: NPC w przypadku przejechania i zmniejszenia prędkości do wartości 0 wsiada po czym się zabija w ambulansie (W realizacji naprawy) Teksty nie zmieniają się dynamicznie po szybkiej zmianie języka podczas wyświetlania aktualnego komunikatu w poprzednim języku (Rozpoznawanie błędu) Projekt po publikacji zostanie wydany na licencji GPL V3 oraz zgodnie z wymogami licencji cały kod zostanie opublikowany na zasadzie open source. Prezentacja:
  5. Hello, I have a problem with synchronization trailer because the trailer MTA walks away from Player A certain distance lose their proper sync, I wanted to remedy after the execution of the New Stremaera trailers but there are still problems at the bottom of sending the code: Server-Side: function Unhook(player) if getPedOccupiedVehicle( player ) then local theTruck = getPedOccupiedVehicle( player ) if detachTrailerFromVehicle(theTruck) then local theTrailer = getElementData(theTruck,"Trailer") local x,y,z = getElementPosition( theTruck ) local _,_,rot = getElementRotation( theTruck ) local rot = 360-rot local rot = math.rad(rot) local x = x - 15 * math.sin(rot) local y = y - 15 * math.cos(rot) setElementPosition( theTrailer, x,y,z ) end end end addCommandHandler( "unhook", Unhook ) function onTrailerAttach(theTruck) setElementData(theTruck,"Trailer",source) triggerClientEvent( "addTrailer", getRootElement( ),theTruck, source ) end addEventHandler("onTrailerAttach", getRootElement(), onTrailerAttach) function onTrailerDetach(theTruck) triggerClientEvent( "removeTrailer", getRootElement( ), theTruck, source ) end addEventHandler("onTrailerDetach", getRootElement(), onTrailerDetach) Client-Side: Amount = 0 Sync = false Trailers = {} Timer = getTickCount( ) local screenW, screenH = guiGetScreenSize() function getTrailer(theTruck,theTrailer) for i,v in ipairs(Trailers) do if v.truck == theTruck and v.trailer == theTrailer then return theTruck, theTrailer, i end end return nil, nil, false end function addTrailer(theTruck, theTrailer) local _, _, index = getTrailer(theTruck,theTrailer) if not(index) then table.insert(Trailers, {truck=theTruck, trailer=theTrailer} ) end end function deleteTrailer(theTruck, theTrailer) local _, _, index = getTrailer(theTruck,theTrailer) if index then table.remove(Trailers, index) setElementData(theTruck,"Trailer",false) end collectgarbage() end function UpdateSyncedTrailer() if getTickCount()-Timer > 5000 then Timer = getTickCount( ) Amount = 0 Sync = false for i,v in ipairs(Trailers) do if isElementStreamedIn( v.truck ) and isElementStreamedIn( v.trailer ) then if not( getPedOccupiedVehicle( getLocalPlayer( ) ) == v.truck) then detachTrailerFromVehicle( v.truck, v.trailer ) attachTrailerToVehicle( v.truck, v.trailer ) Sync = true end Amount = Amount+1 end end collectgarbage() end dxDrawText("Streaming Trailers: "..Amount.." | Size Array: "..#Trailers.." | Memory use: "..collectgarbage("count")*1024 .." | Update Time next Sync: ".. math.abs( getTickCount()-Timer - 5000 ) , screenW * 0.0063, screenH * 0.9333, screenW * 0.2906, screenH * 0.9700, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender",root,UpdateSyncedTrailer) function onClientTrailerAttach(TheTruck, TheTrailer) if not( getElementType(source) == "vehicle" ) then source = TheTrailer end --setElementStreamable ( source, true ) addTrailer(TheTruck, source) end addEventHandler("onClientTrailerAttach", getRootElement(), onClientTrailerAttach) addEvent ( "addTrailer", true ) addEventHandler ( "addTrailer", getRootElement(), onClientTrailerAttach ) function onClientTrailerDetach(TheTruck, TheTrailer) if not( getElementType(source) == "vehicle" ) then source = TheTrailer end --setElementStreamable ( source, false ) if not(Sync) then deleteTrailer(TheTruck, source) end end addEventHandler("onClientTrailerDetach", getRootElement(), onClientTrailerDetach) addEvent ( "removeTrailer", true ) addEventHandler ( "removeTrailer", getRootElement(), onClientTrailerDetach ) function onClientElementStreamIn() if getElementType(source) == "vehicle" then if getElementData(source,"Trailer") then addTrailer(source, getElementData(source,"Trailer") ) end end end addEventHandler( "onClientElementStreamIn", getRootElement( ), onClientElementStreamIn) function onClientElementStreamOut() if getElementType(source) == "vehicle" then if getElementData(source,"Trailer") then --removeTrailer(source, getElementData(source,"Trailer") ) end end end addEventHandler( "onClientElementStreamOut", getRootElement( ), onClientElementStreamOut) I will be grateful for any kind of help, I'm sorry to be so that my english.
×
×
  • Create New...