Jump to content

Ciastuuś

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by Ciastuuś

  1. https://forum.multitheftauto.com/topic/40937-tutcode-synchronize-account-creation-between-ipb-and-mta/
  2. Dodam również od siebie dla innych. Napisałem kod w czytelny oraz optymalny sposób, aby nie bałaganić if'ami. local prefixes = { [1] = {"[Wlasciciel]", 255, 0, 0}, [2] = {"[Administrator]", 255, 0, 0}, [3] = {"[Supporter]", 0, 255, 0}, [4] = {"[Gracz]", 255, 255, 0}, } function onPlayerChatPrefix(message, messageType) if messageType == 0 then -- typ 0 oznacza chat, a 1 to konsola local playerName = getPlayerName(source) local playerPrefix = "" for i, prefixData in ipairs(prefixes) do if hasObjectPermissionTo(source, "function." .. prefixData[1], false) then -- sprawdzenie, czy gracz ma uprawnienia do danego prefixu(acl) playerPrefix = "[" .. prefixData[1] .. "] " break end end local r, g, b = getPlayerNametagColor(source) -- pobranie koloru nicku local messageWithPrefix = playerPrefix .. playerName .. ": " .. message -- utworzenie nowej wiadomości z prefixem outputChatBox(messageWithPrefix, root, r, g, b, true) -- wysłanie nowej wiadomości na czacie cancelEvent() -- anulowanie oryginalnej wiadomości, aby nie została wyświetlona end end addEventHandler("onPlayerChat", root, onPlayerChatPrefix)
  3. Prościej by było utworzyć serwer lokalny, a gdy się takowy utworzy to zalogować się na konto administratora(acl) oraz wpisać komendę /start editor - aby włączyć edytor map...
  4. Określ również pojazd i sprawdzaj czy gracz siedzi w danym pojeździe. Bo z tego co widać w kodzie to tylko określasz samego gracza, a o pojeździe nie ma żadnej wzmianki.
  5. You must specify the player who entered the marker, not the entire server.
  6. What's your problem? The script works fine. It loads the marker, the gui is loaded, all buttons in it work and trigger.
  7. Sprawdź czy zapora sieciowa nie blokuje możliwości dołączania na inne serwery, a do tego sprawdź swoją prędkość internetu. W ostateczności spróbuj uruchomić mta jako administrator.
  8. Pokaż ustawienia rozdzielczości w ustawieniach mta oraz monitora w komputerze/laptopie, aby stwierdzić problem.
  9. Spróbuj usunąć wszystkie zasoby które załadowały serwery. Może wkradł się mały błąd z ich strony. To tylko moja sugestia! Do tego spróbuj zaktualizować mta jeśli to możliwe.
  10. Z jakiej wersji systemu korzystasz? Zainstalowałeś poprawnie całą grę? Usuwałeś coś z plików, lub coś? Spróbuj uruchomić MTA w trybie zgodności z Windows 7.
  11. Use, https://wiki.multitheftauto.com/wiki/CallRemote
  12. Ciastuuś

    aid

    Please code.
  13. createPed("217", 413.712890625, 2537.95703125, 19.1484375, false) replace ped = createPed(217, 413.712890625, 2537.95703125, 19.1484375, false) --- questCol = createColSphere (413.9287109375, 2536.9140625, 19.1484375 ) replace questCol = createColSphere (413.9287109375, 2536.9140625, 19.1484375, radius_need_number ) radius_need_number - the collision sphere's radius
  14. Hi, I started translating your project from Ruskie into English so that everyone could understand what the game is about. Can you provide a discord so that I can contact you?
  15. Użyj tego, https://wiki.multitheftauto.com/wiki/OnClientRender
  16. Połączyłeś się z bazą danych? Masz nadane uprawnienia w bazie danych? Błędy w /debugscript 3?
  17. https://community.multitheftauto.com/index.php?p=resources&s=details&id=8209 https://community.multitheftauto.com/index.php?p=resources&s=details&id=4892
  18. function CommandHandler( thePlayer ) local loginACL = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..loginACL.."", "Straz Pozarna") then setElementPosition (thePlayer, -2066.3000488281 ,17.700000762939 ,35.299999237061 ) outputChatBox("Witaj na spawnie!", thePlayer) else outputChatBox("Nie jesteś w Straży Pożarnej!", thePlayer) end end addCommandHandler ( "psp", CommandHandler )
  19. Hi, I have a question. How to rotate in a different direction? Because it looks like this: Server: Code: local x,y = guiGetScreenSize() local show = true function dxDrawCircle( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI ) if ( type( posX ) ~= "number" ) or ( type( posY ) ~= "number" ) then return false end local function clamp( val, lower, upper ) if ( lower > upper ) then lower, upper = upper, lower end return math.max( lower, math.min( upper, val ) ) end radius = type( radius ) == "number" and radius or 50 width = type( width ) == "number" and width or 5 angleAmount = type( angleAmount ) == "number" and angleAmount or 0 startAngle = clamp( type( startAngle ) == "number" and startAngle or 0, 0, 360 ) stopAngle = clamp( type( stopAngle ) == "number" and stopAngle or 360, 0, 360 ) color = color or tocolor( 25, 25, 25, 0 ) postGUI = type( postGUI ) == "boolean" and postGUI or false if ( stopAngle < startAngle ) then local tempAngle = stopAngle stopAngle = startAngle startAngle = tempAngle end for i = startAngle, stopAngle, angleAmount do local startX = math.cos( math.rad( i ) ) * ( radius - width ) local startY = math.sin( math.rad( i ) ) * ( radius - width ) local endX = math.cos( math.rad( i ) ) * ( radius + width ) local endY = math.sin( math.rad( i ) ) * ( radius + width ) dxDrawLine( startX + posX, startY + posY, endX + posX, endY + posY, color, width, postGUI ) end return true end local health = tonumber(getElementHealth(localPlayer)) or 0 local armor = tonumber(getPedArmor(localPlayer)) or 0 local hunger = getElementData(localPlayer, "gracz:glod") local thirsty = getElementData(localPlayer, "gracz:spragnienie") function drawCircleHud() if (show==true) then dxDrawCircle(x-250, 35, 0.1, 22.1, 1, 0, 360, tocolor(25, 25, 25)) dxDrawCircle(x-250, 35, 24, 2, 1, 0, health*3.6, tocolor(255, 50, 50)) dxDrawImage(1657, 24, 24, 24, "grafika/zycie.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawCircle(x-180, 35, 0.1, 22.1, 1, 0, 360, tocolor(25, 25, 25)) dxDrawCircle(x-180, 35, 24, 2, 1, 0, armor*3.6, tocolor(66, 134, 244)) dxDrawImage(1728, 24, 24, 24, "grafika/kamizelka.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawCircle(x-110, 35, 0.1, 22.1, 1, 0, 360, tocolor(25, 25, 25)) dxDrawCircle(x-110, 35, 24, 2, 1, 0, hunger*3.6, tocolor(158, 97, 29)) dxDrawImage(1800, 24, 24, 24, "grafika/glod.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawCircle(x-40, 35, 0.1, 22.1, 1, 0, 360, tocolor(25, 25, 25)) dxDrawCircle(x-40, 35, 24, 2, 1, 0, thirsty*3.6, tocolor(14, 173, 175)) dxDrawImage(1869, 24, 24, 24, "grafika/spragnienie.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end end addEventHandler("onClientRender", root, drawCircleHud) local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" } addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end end)
×
×
  • Create New...