-
Posts
38 -
Joined
-
Last visited
Everything posted by Ciastuuś
-
Połączenie MTA > FORUM IPS
Ciastuuś replied to Paku's topic in Pomoc ze skryptami i programowaniem w Lua
https://forum.multitheftauto.com/topic/40937-tutcode-synchronize-account-creation-between-ipb-and-mta/ -
Pomoc z prefiksami przed nickiem
Ciastuuś replied to NecroFirmaSlot's topic in Pomoc ze skryptami i programowaniem w Lua
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) -
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...
-
Problem z TP autem przez marker.
Ciastuuś replied to Bogdan_jestem's topic in Pomoc ze skryptami i programowaniem w Lua
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. -
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.
-
mta Problem z dołączaniem na serwer / Joining
Ciastuuś replied to Mich.'s topic in Pomoc z grą lub klientem/serwerem MTA
Pokaż ustawienia rozdzielczości w ustawieniach mta oraz monitora w komputerze/laptopie, aby stwierdzić problem. -
Problem z grą/ Game problem
Ciastuuś replied to mmes24's topic in Pomoc z grą lub klientem/serwerem MTA
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. -
Problem z odpaleniem mta CL22 blad 1155
Ciastuuś replied to IsMode's topic in Pomoc z grą lub klientem/serwerem MTA
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. -
Wow... Amazing ?
- 32 replies
-
- mtasa
- mtasa 1.6.x
-
(and 3 more)
Tagged with:
-
Use, https://wiki.multitheftauto.com/wiki/CallRemote
-
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
-
Good work ?
- 25 replies
-
- mtasa
- mtasa 1.5.x
-
(and 1 more)
Tagged with:
-
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?
-
Automatyczne nadawanie nitra - problem
Ciastuuś replied to mrJakso's topic in Pomoc ze skryptami i programowaniem w Lua
https://wiki.multitheftauto.com/wiki/OnPickupHit -
Potrzebuje pomocy ze skryptem
Ciastuuś replied to CertER's topic in Pomoc ze skryptami i programowaniem w Lua
Użyj tego, https://wiki.multitheftauto.com/wiki/OnClientRender -
Połączyłeś się z bazą danych? Masz nadane uprawnienia w bazie danych? Błędy w /debugscript 3?
-
[SZUKAM] Skryptu na radio /radio
Ciastuuś replied to xKrokolTV's topic in Pomoc ze skryptami i programowaniem w Lua
https://community.multitheftauto.com/index.php?p=resources&s=details&id=8209 https://community.multitheftauto.com/index.php?p=resources&s=details&id=4892 -
Skrypt na spawn dla frakcji
Ciastuuś replied to Karol998's topic in Pomoc ze skryptami i programowaniem w Lua
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 ) -
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)