Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-11-08, 16:18


mccpitero

Jestem kimś






Wiek: 24
Na forum: 3907 dni
Posty: 33
Nick w MP: SP|Nitro



Respekt: 60

witam,mam problem z pewnym ruskim skryptem i ch?tnie chcia?bym ?eby by? po Polsku ale nie umiem tego zrobi? ;/

Tutaj jest ten skrypt: http://hostuje.net/file.p...0ee6522cef30597

Bardzo prosz? ?eby kto? go przet?umaczy? na j?zyk Polski a tak?e zmieni? ceny z 10k i 40k na 50$.

By?ym bardzo wdzi?czny i da?bym piwo oraz respekt :) .

[ Dodano: 2016-11-08, 17:29 ]
poprawka! zamiast 50$ chce ?eby by?o 0$!!!!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-11-08, 16:45


Kradus







Wiek: 28
Na forum: 4310 dni
Posty: 100
Nick w MP: Salldan

Piwa: 78

Respekt: 50

remover.lua

setTimer ( function()
    for k, thePlayer in ipairs (getElementsByType("player")) do
        veh = getPedOccupiedVehicle(thePlayer)
        if veh and getVehicleController( veh ) == thePlayer then
            if getElementModel(veh) == 401 then return end
            if not getElementData(thePlayer, "DriveLicense") then
                x, y, z = getElementPosition ( veh )
                removePedFromVehicle(thePlayer)
                setElementPosition ( thePlayer, x, y+1, z)
                outputChatBox ("Nie masz prawa jazdy!", thePlayer, 0, 190, 255)
            end
            if getElementData(veh, "owner") then
                if getElementData(veh, "owner") ~= "Nobody" then      
                    if getElementData(veh, "owner") ~= getAccountName(getPlayerAccount(thePlayer)) then
                        if not isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
                            removePedFromVehicle(thePlayer)
                            outputChatBox("To nie jest tw?j samoch?d!", thePlayer, 255,255,127)
                        end
                    end
                end
            end
        end
    end
end, 250, 0)


drive_client.lua


ASchool = {

button = {},
window = {}
}

localPlayer = getLocalPlayer()
addEventHandler("onClientResourceStart", resourceRoot, function(res)

    if res == getThisResource() then
        ASchool.window[1] = guiCreateWindow(453, 346, 318, 236, "Szko?a Jazdy", false)

        guiWindowSetSizable(ASchool.window[1], false)


        ASchool.button[1] = guiCreateButton(45, 33, 218, 31, "Koszt Egzaminu - 50$", false, ASchool.window[1])

        guiSetFont(ASchool.button[1], "default-bold-small")

        guiSetProperty(ASchool.button[1], "NormalTextColour", "FFFFFFFF")

        ASchool.button[2] = guiCreateButton(45, 74, 218, 31, "Koszt prawa jazdy - 50$", false, ASchool.window[1])

        guiSetFont(ASchool.button[2], "default-bold-small")

        guiSetProperty(ASchool.button[2], "NormalTextColour", "FFFFFFFF")

        ASchool.button[3] = guiCreateButton(45, 182, 218, 31, "Wyj?cie", false, ASchool.window[1])

        guiSetFont(ASchool.button[3], "default-bold-small")

        guiSetProperty(ASchool.button[3], "NormalTextColour", "FFFFFFFF")
        ------------------------------------------------------------------------------
        guiSetVisible(ASchool.window[1], false)
        showCursor(false)
    end
end)
addEventHandler("onClientResourceStop", resourceRoot, function(res)

    if res == getThisResource() then
        if isElement(ASchool.window[1]) then destroyElement(ASchool.window[1]) end
        if isElement(ASchool.button[1]) then destroyElement(ASchool.button[1]) end
        if isElement(ASchool.button[2]) then destroyElement(ASchool.button[2]) end
        if isElement(ASchool.button[3]) then destroyElement(ASchool.button[3]) end
        ASchool.window[1] = nil
        ASchool.button[1] = nil
        ASchool.button[2] = nil

        ASchool.button[3] = nil
    end
end)
function hideGuiSc(player)
    if (guiGetVisible(ASchool.window[1]) == false) then 
        guiSetVisible(ASchool.window[1], true)
        showCursor(true)
    else
        guiSetVisible(ASchool.window[1], false)
        showCursor(false)
    end
end
addEvent( "ShowSchool", true )
addEventHandler( "ShowSchool", resourceRoot, hideGuiSc )

function onGuiClickPanel (button, state, absoluteX, absoluteY)
    if (source == ASchool.button[1]) then
         triggerServerEvent ( "GoToDrive", resourceRoot, localPlayer )
         hideGuiSc (localPlayer)
    elseif (source == ASchool.button[2]) then
         if getElementData ( localPlayer, "DriveLicense") == false then
             if getPlayerMoney () > 39999 then
                 triggerServerEvent ( "GiveLic", resourceRoot, localPlayer )
                 triggerServerEvent("serverTakePlayerMoney", getRootElement(), localPlayer, 40000 )
             else
                 outputChatBox("Nie masz wystarczaj?cej ilo?ci pieni?dzy!",0,0,255,true)
             end
         else
             outputChatBox("Masz ju? prawo jazdy!",0,0,255,true) --- Nie jestem pewien
         end
         hideGuiSc (localPlayer)
    elseif (source == ASchool.button[3]) then
         hideGuiSc (localPlayer)
    end
end
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClickPanel)


drive_server.lua

local dsm0
local dsm1 = {}
local dsm2 = {}
local dsm3 = {}
local dsm4 = {}
local dsm5 = {}
local dsm6 = {}
local dsm7 = {}
local dsm8 = {}
local dsm9 = {}
local dsm10 = {}
local dsm11 = {}
local dsm12 = {}
local dsm13 = {}
local dsm14 = {}
local dsm15 = {}
local dsm16 = {}
local dsb0
local dsb1 = {}
local schits= {}
local veh = {}
local scpoints = {
  {-2026.6, -101.9, 34.2}, --Znacznik szko?y
  {-2027.4, -127.4, 35.3}, --Rozpocz?cie jazdy
  {-2028.4, -156.7, 34.2}, --Marker 1
  {-2023.7, -193.10001, 34.2}, --Marker 2
  {-2022.7, -252.2, 34.2}, --Marker 3
  {-2074, -245.89999, 36}, --Marker 4
  {-2084.1001, -152.89999, 34.3}, --Marker 5
  {-2048.7998, -105.7998, 34.3}, --Marker 6
  {-2048.3999, -95.9, 35.3}, --Teleport Tutaj
  {-2072.1001, -68.1, 33.8}, --Marker 7
  {-2160.1001, -68.1, 33.8}, --Marker 8
  {-2164.2, -10.2, 33.8}, --Marker 9
  {-2158.1001, 91.2, 33.8}, --Marker 10
  {-2156.6001, 210.5, 33.8}, --Marker 11
  {-2249.2, 219.89999, 33.8}, --Marker 12
  {-2236.8, 317.5, 33.8}, --Marker 13
  {-2007.9, 313.5, 33.8}, --Marker 14
  {-2010.2, -65.7, 34}, --Marker 15
  {-2070.3, -96.8, 34}, --Marker 16 Meta
  {-2028.3, -98.8, 34} --Teleport Gracza
}

function resourceStart (res)
    if res == getThisResource() then
        dsm0 = createMarker (  scpoints[1][1], scpoints[1][2], scpoints[1][3], "cylinder", 1.5, 0, 0, 255, 170 )
    end
end
addEventHandler ( "onResourceStart", getRootElement(), resourceStart )

function resourceStop (res)
    if res == getThisResource() then
        if isElement(dsm0) then destroyElement(dsm0) end
        dsm0 = nil
        for k, p in ipairs(getElementsByType("player")) do
            stopDrive(p)
        end
    end
end
addEventHandler ( "onResourceStop", getRootElement(), resourceStart )

function markerSchool(marker)
    if marker == dsm0 then
        triggerClientEvent (source, "ShowSchool", getRootElement(), source )
    elseif marker == dsm1[source] and (dsm1[source]) then
        schits[source] = 1
        if isElement ( dsm1[source] ) then destroyElement ( dsm1[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm1[source] = nil
        dsb1[source] = nil
        dsm2[source] = createMarker (  scpoints[4][1], scpoints[4][2], scpoints[4][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[4][1], scpoints[4][2], scpoints[4][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm2[source] and (dsm2[source]) then
        schits[source] = 2
        if isElement ( dsm2[source] ) then destroyElement ( dsm2[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm2[source] = nil
        dsb1[source] = nil
        dsm3[source] = createMarker (  scpoints[5][1], scpoints[5][2], scpoints[5][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[5][1], scpoints[5][2], scpoints[5][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm3[source] and (dsm3[source]) then
        schits[source] = 3
        if isElement ( dsm3[source] ) then destroyElement ( dsm3[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm3[source] = nil
        dsb1[source] = nil
        dsm4[source] = createMarker (  scpoints[6][1], scpoints[6][2], scpoints[6][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[6][1], scpoints[6][2], scpoints[6][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm4[source] and (dsm4[source]) then
        schits[source] = 4
        if isElement ( dsm4[source] ) then destroyElement ( dsm4[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm4[source] = nil
        dsb1[source] = nil
        dsm5[source] = createMarker (  scpoints[7][1], scpoints[7][2], scpoints[7][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[7][1], scpoints[7][2], scpoints[7][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm5[source] and (dsm5[source]) then
        schits[source] = 5
        if isElement ( dsm5[source] ) then destroyElement ( dsm5[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm5[source] = nil
        dsb1[source] = nil
        dsm6[source] = createMarker (  scpoints[8][1], scpoints[8][2], scpoints[8][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[8][1], scpoints[8][2], scpoints[8][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm6[source] and (dsm6[source]) then
        schits[source] = 6
        if isElement ( dsm6[source] ) then destroyElement ( dsm6[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm6[source] = nil
        dsb1[source] = nil
        dsm7[source] = createMarker (  scpoints[10][1], scpoints[10][2], scpoints[10][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[10][1], scpoints[10][2], scpoints[10][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
        setElementPosition ( getPedOccupiedVehicle (source), scpoints[9][1], scpoints[9][2], scpoints[9][3] )
        outputChatBox("Теперь вождение по городу! Будьте осторожны!", source,0,255,0,true)  
    elseif marker == dsm7[source] and (dsm7[source]) then
        schits[source] = 7
        if isElement ( dsm7[source] ) then destroyElement ( dsm7[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm7[source] = nil
        dsb1[source] = nil
        dsm8[source] = createMarker (  scpoints[11][1], scpoints[11][2], scpoints[11][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[11][1], scpoints[11][2], scpoints[11][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm8[source] and (dsm8[source]) then
        schits[source] = 8
        if isElement ( dsm8[source] ) then destroyElement ( dsm8[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm8[source] = nil
        dsb1[source] = nil
        dsm9[source] = createMarker (  scpoints[12][1], scpoints[12][2], scpoints[12][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[12][1], scpoints[12][2], scpoints[12][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm9[source] and (dsm9[source]) then
        schits[source] = 9
        if isElement ( dsm9[source] ) then destroyElement ( dsm9[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm9[source] = nil
        dsb1[source] = nil
        dsm10[source] = createMarker (  scpoints[13][1], scpoints[13][2], scpoints[13][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[13][1], scpoints[13][2], scpoints[13][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm10[source] and (dsm10[source]) then
        schits[source] = 10
        if isElement ( dsm10[source] ) then destroyElement ( dsm10[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm10[source] = nil
        dsb1[source] = nil
        dsm11[source] = createMarker (  scpoints[14][1], scpoints[14][2], scpoints[14][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[14][1], scpoints[14][2], scpoints[14][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm11[source] and (dsm11[source]) then
        schits[source] = 11
        if isElement ( dsm11[source] ) then destroyElement ( dsm11[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm11[source] = nil
        dsb1[source] = nil
        dsm12[source] = createMarker (  scpoints[15][1], scpoints[15][2], scpoints[15][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[15][1], scpoints[15][2], scpoints[15][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm12[source] and (dsm12[source]) then
        schits[source] = 12
        if isElement ( dsm12[source] ) then destroyElement ( dsm12[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm12[source] = nil
        dsb1[source] = nil
        dsm13[source] = createMarker (  scpoints[16][1], scpoints[16][2], scpoints[16][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[16][1], scpoints[16][2], scpoints[16][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm13[source] and (dsm13[source]) then
        schits[source] = 13
        if isElement ( dsm13[source] ) then destroyElement ( dsm13[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm13[source] = nil
        dsb1[source] = nil
        dsm14[source] = createMarker (  scpoints[17][1], scpoints[17][2], scpoints[17][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[17][1], scpoints[17][2], scpoints[17][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm14[source] and (dsm14[source]) then
        schits[source] = 14
        if isElement ( dsm14[source] ) then destroyElement ( dsm14[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm15[source] = createMarker (  scpoints[18][1], scpoints[18][2], scpoints[18][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[18][1], scpoints[18][2], scpoints[18][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm15[source] and (dsm15[source]) then
        schits[source] = 15
        if isElement ( dsm15[source] ) then destroyElement ( dsm15[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm15[source] = nil
        dsb1[source] = nil
        dsm16[source] = createMarker (  scpoints[19][1], scpoints[19][2], scpoints[19][3], "cylinder", 3, 0, 0, 255, 170, source )
        dsb1[source] = createBlip( scpoints[19][1], scpoints[19][2], scpoints[19][3], 56, 2, 0, 0, 0, 0, 255, 99999, source)
    elseif marker == dsm16[source] and (dsm16[source]) then
        schits[source] = 16
        if isElement ( dsm16[source] ) then destroyElement ( dsm16[source] ) end
        if isElement ( dsb1[source] ) then destroyElement ( dsb1[source] ) end
        dsm6[source] = nil
        dsb1[source] = nil
        setElementData(source, "inSchool", false)
        schits[source] = nil
        giveLicense (source)
        destroyElement( getPedOccupiedVehicle (source) )
        removePedFromVehicle (source)
        setElementPosition ( source, scpoints[20][1], scpoints[20][2], scpoints[20][3] )
    end
end
addEventHandler("onPlayerMarkerHit",getRootElement(),markerSchool)

function startDrive (player)
    --for k,pl in ipairs ( getElementsByType ( "player" ) ) do
        --if not getElementData(pl, "inSchool") then
            if getElementData ( player, "DriveLicense") == false then
                if getPlayerMoney (player) > 9999 then
                    dsm1[player] = createMarker (  scpoints[3][1], scpoints[3][2], scpoints[3][3], "cylinder", 3, 0, 0, 255, 170, player )
                    dsb1[player] = createBlip( scpoints[3][1], scpoints[3][2], scpoints[3][3], 56, 2, 0, 0, 0, 0, 255, 99999, player )
                    if isElement(veh[player]) then destroyElement(veh[player]) end
                    veh[player] = createVehicle ( 401, scpoints[2][1], scpoints[2][2], scpoints[2][3], 0, 0, 180 )
                    warpPedIntoVehicle ( player, veh[player], 0 )
                    setElementData(player, "inSchool", true)
                    schits[player] = 0
                    takePlayerMoney(player, 10000)
                    outputChatBox("Tw?j cel - To jazda przez niebieskie punkty a? do ostatniego. Nie mo?esz uderzy? w innych albo zlecie? na pobocze bo inaczej nie zdasz!", player,0,255,0,true)
                 else
                     outputChatBox("Nie masz wystarczaj?cej ilo?ci pieni?dzy!", player,0,0,255,true)
                 end
             else
                 outputChatBox("Masz ju? prawo jazdy!", player,0,0,255,true) -- Nie jestem pewien
             end
        --else
            --outputChatBox("В данный момент уже кто-то сдаёт на права, дождитесь, пока он завершит вождение!", player,0,0,255,true)
        --end
    --end
end
addEvent( "GoToDrive", true )
addEventHandler( "GoToDrive", resourceRoot, startDrive )

function giveLicense (player)
    setElementData ( player, "DriveLicense", true )
    outputChatBox("Gratulacje! Uda?o Ci si? zda? egzamin na prawo jazdy!", player,0,255,0,true)
end
addEvent( "GiveLic", true )
addEventHandler( "GiveLic", resourceRoot, giveLicense )

function stopDrive (player)
    if getElementData(player, "inSchool") then
        setElementData(player, "inSchool", false)
        schits[player] = false
        if isPedInVehicle(player) then destroyElement(getPedOccupiedVehicle(player)) end
        if isElement ( dsm1[player] ) then destroyElement (  dsm1[player] ) end
        if isElement ( dsm2[player] ) then destroyElement (  dsm2[player] ) end
        if isElement ( dsm3[player] ) then destroyElement (  dsm3[player] ) end
        if isElement ( dsm4[player] ) then destroyElement (  dsm4[player] ) end
        if isElement ( dsm5[player] ) then destroyElement (  dsm5[player] ) end
        if isElement ( dsm6[player] ) then destroyElement (  dsm6[player] ) end
        if isElement ( dsm7[player] ) then destroyElement (  dsm7[player] ) end
        if isElement ( dsm8[player] ) then destroyElement (  dsm8[player] ) end
        if isElement ( dsm9[player] ) then destroyElement (  dsm9[player] ) end
        if isElement ( dsm10[player] ) then destroyElement (  dsm10[player] ) end
        if isElement ( dsm11 [player] ) then destroyElement (  dsm11 [player] ) end
        if isElement ( dsm12 [player] ) then destroyElement (  dsm12 [player] ) end
        if isElement ( dsm13 [player] ) then destroyElement (  dsm13 [player] ) end
        if isElement ( dsm14 [player] ) then destroyElement (  dsm14 [player] ) end
        if isElement ( dsm15 [player] ) then destroyElement (  dsm15 [player] ) end
        if isElement ( dsm16 [player] ) then destroyElement (  dsm16 [player] ) end
        if isElement ( dsb1 [player] ) then destroyElement (  dsb1 [player] ) end
        outputChatBox("Egzamin zako?czony!", player,0,255,0,true)
        givePlayerMoney(player, 20)--- Za niezdanie 20$ Mo?esz to wywali?
        outputChatBox("Otrzymujesz zwrot koszt?w w wysoko?ci 20$ Dzi?ki czemu mo?esz przyst?pi? ponownie",player,0,255,0,true)---To te?
        if getPedOccupiedVehicle (player)  then destroyElement (  getPedOccupiedVehicle (player) ) removePedFromVehicle(player) end
        setElementPosition ( player, scpoints[20][1], scpoints[20][2], scpoints[20][3] )
    end
end

function SchoolStop ( player )
    stopDrive (player)
end
addEventHandler ( "onVehicleExit", getRootElement(), SchoolStop )


function damageVeh( )
    player = getVehicleOccupant(source)
    if player then
        stopDrive (player)
    end
end 
addEventHandler("onVehicleDamage", getRootElement(), damageVeh)

function quitPlayer ( )
    stopDrive(source)
end
addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayer )
addEventHandler ( "onPlayerWasted", getRootElement(), quitPlayer )

function Type1 (player)     
    if getElementData (player, "DriveLicense" ) then
        setElementData ( player, "DriveLicense", false )
        outputChatBox("Usuni?to prawo jazdy.",player,255,0,0,true)
    end
end
addCommandHandler ("dremove", Type1)


Mog?e? po prostu wrzuci? do t?umacza google i po prostu poprawi? t?umaczenie tak aby wygl?da?o na polskie. Drobnostka ale browara mo?esz postawi? :mrgreen: Ale tak wgl to brakuje czego? w tym skrypcie powiem Ci.

Postaw piwo autorowi tego posta
 

 
Tagi: tłumaczenie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » tłumaczenie Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku