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

Wysłany: 2017-10-14, 19:32


MalyCyferek

Bezmózgi






Wiek: 27
Na forum: 3460 dni
Posty: 29

Piwa: 96

Respekt: 45,3

Witam, ot?? chcia?bym ?eby skrypt: https://community.mtasa.com/index.php?p=resources&s=details&id=12778 Mogli u?ywa? tylko admini :/ | Oczywi?cie za pomoc daje Zimne :piwo: !

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-18, 19:51


NoKill1997

Online






Wiek: 29
Na forum: 3365 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 783

Respekt: 80,5

Chcialbym aby w tej pracy:
http://www48.zippyshare.com/v/QWk6JRMt/file.html
mozna bylo ja rozpoczac po przez klikniecie w GUI napisu rozpocznij

Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-29, 18:35


xWilczu







Wiek: 25
Na forum: 4108 dni
Posty: 25
Nick w MP: Svatekl



Respekt: 50

Pomocy! Przerobi mi kto? ogrpg-parking z it's your world, abym m?g? zamieni? np. nazw? Banshee na Lamborghini? Najlepiej co? pod t? linijk?: (Tak ?eby w przechowalni zamiast Banshee to pisa?o Lambo itd.)

local customCarNames = --
{
[429]= 'Lamborghini';
}

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-18, 14:38


quadowca11







Wiek: 33
Na forum: 3724 dni
Posty: 5
Nick w MP: quadowca11

Piwa: 34

Respekt: 30

local nowy_rok = 5106840 - getRealTime().timestamp

local function nowyrok()
nowy_rok = nowy_rok - 1
end
setTimer(nowyrok, 1000, 0)

local function timeCount(numSec)
local hours = string.format(^%02.f", math.floor(numSec/3600))
local mins = string.format("%02.f", math.floor(numSec/60 = (hours*60))
local sec = string.format("%02.f", math.floor(numSec -hours*3600 - mins * 60))
return hours..":"..mins..":"..sec



Dodajcie dxdrawtext zeby pojawialo sie na prawym donlym rogu ten czas z gory dzieki

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-04, 18:05


Waszkaa







Wiek: 33
Na forum: 3361 dni
Posty: 24
Nick w MP: WaszkaG



Respekt: 50

Witam !
Prosze o przerobienie skryptu w taki spos?b aby mozna by?o sie teleportowac razem z autem w kt?rym sie siedzi. P?ki co tylko mozna sie tepac gdy jest sie poza autem

Z g?ry dzi?ki i za pomoc daje R* :piwo:


function Window ( )

        if ( guiGetVisible ( myWindow ) == true ) then   
        
                guiSetVisible ( myWindow, false )

                showCursor ( false )
        else      
                guiSetVisible ( myWindow, true )

                showCursor ( true )
        end
end


myWindow = guiCreateWindow ( 0.16, 0.0, .7, .7, "JDM Legends", true )


local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow )
local Teleports = guiCreateTab( "Teleport na Mapy", tabPanel )




--GUI Buttons
LSAirport = guiCreateButton( 0.03, 0.01, 0.18, 0.12, "Touge Akina UP", true, Teleports )
guiSetFont ( LSAirport, "default-bold-small" )

LVAirport = guiCreateButton( 0.03, 0.13, 0.18, 0.12, "Touge Akina Down", true, Teleports )
guiSetFont ( LVAirport, "default-bold-small" )

AbandedAirstrip = guiCreateButton( 0.03, 0.25, 0.18, 0.12, "Touge Bihoku", true, Teleports )
guiSetFont ( AbandedAirstrip, "default-bold-small" )

SFAirport = guiCreateButton( 0.03, 0.37, 0.18, 0.12, "Drift Stage", true, Teleports )
guiSetFont ( SFAirport, "default-bold-small" )

MountChiliad = guiCreateButton( 0.03, 0.49, 0.18, 0.12, "East Minami Circuit", true, Teleports )
guiSetFont ( MountChiliad, "default-bold-small" )

WangCars = guiCreateButton( 0.03, 0.61, 0.18, 0.12, "Meihancircuit", true, Teleports )
guiSetFont ( WangCars, "default-bold-small" )

Ottos = guiCreateButton( 0.4, 0.01, 0.18, 0.12, "Drift Track", true, Teleports )
guiSetFont ( Ottos, "default-bold-small" )

Area51 = guiCreateButton( 0.4, 0.13, 0.18, 0.12, "Touge Ebisu Soutch", true, Teleports )
guiSetFont ( Area51, "default-bold-small" )

BigEar = guiCreateButton( 0.4, 0.25, 0.18, 0.12, "Touge Ebisu West", true, Teleports )
guiSetFont ( BigEar, "default-bold-small" )

BlueBerry = guiCreateButton( 0.4, 0.37, 0.18, 0.12, "Touge Project Touge", true, Teleports )
guiSetFont ( BlueBerry, "default-bold-small" )

Heli = guiCreateButton( 0.4, 0.49, 0.18, 0.12, "Touge Nikko", true, Teleports )
guiSetFont ( Heli, "default-bold-small" )

Grove = guiCreateButton( 0.4, 0.61, 0.18, 0.12, "Nakayubi", true, Teleports )
guiSetFont ( Grove, "default-bold-small" )

Dam = guiCreateButton( 0.77, 0.01, 0.18, 0.12, "Touge Okaru", true, Teleports )
guiSetFont ( Dam, "default-bold-small" )

BackBeyond = guiCreateButton( 0.77, 0.13, 0.18, 0.12, "Touge Gokart", true, Teleports )
guiSetFont ( BackBeyond, "default-bold-small" )

Quarry = guiCreateButton( 0.77, 0.25, 0.18, 0.12, "Ultra Nitro Track", true, Teleports )
guiSetFont ( Quarry, "default-bold-small" )

Bayside = guiCreateButton( 0.77, 0.37, 0.18, 0.12, "Touge Sekia.", true, Teleports )
guiSetFont ( Bayside, "default-bold-small" )

Pecker = guiCreateButton( 0.77, 0.49, 0.18, 0.12, "Tsukuba", true, Teleports )
guiSetFont ( Pecker, "default-bold-small" )

Bridge = guiCreateButton( 0.77, 0.61, 0.18, 0.12, "Fantazy Hill", true, Teleports )
guiSetFont ( Bridge, "default-bold-small" )


Redring = guiCreateButton( 0.4, 0.78, 0.18, 0.063, "", true, Teleports )
guiSetFont ( Close, "default-bold-small" )
Garage = guiCreateButton( -0.08, 0.87, 1.1, 0.063, "Garaz", true, Teleports )
guiSetFont ( Close, "default-bold-small" )
Close = guiCreateButton( -0.08, 0.94, 1.1, 0.063, "Zamknij", true, Teleports )
guiSetFont ( Close, "default-bold-small" )


bindKey ( "F2", "down", Window )


guiSetAlpha ( myWindow, 1 )
guiWindowSetSizable ( myWindow, false )

--Label Color
function changeLabelColor ( )

    guiLabelSetColor ( One, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end

setTimer ( changeLabelColor, 1000, 0 )


--Close
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
           if (source == Close) then
           guiSetVisible( myWindow, false )
           showCursor( false )
                end  

           end
)


--Teleports
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == MountChiliad) then
            local player = getLocalPlayer()
                    setElementPosition (player , -877.7409667969, 520.6766357422, 14.1091003418  )
            end
          end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == LSAirport) then
            local player = getLocalPlayer()
                        setElementPosition (player , -3289.7409667969, 890.6766357422, 322.1091003418  ) 
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == LVAirport) then
            local player = getLocalPlayer()
                  setElementPosition (player , -2926.9138183594, 487.1204833984, 5.2602405548  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == AbandedAirstrip) then
            local player = getLocalPlayer()
                  setElementPosition (player , -3266.59480957031, -1067.1661152344, 13.2322671096  ) 
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == SFAirport) then
            local player = getLocalPlayer()
                  setElementPosition (player , -3112.1933, -868.0136820678711, 10.471401863098  ) 
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == WangCars) then
            local player = getLocalPlayer()
                  setElementPosition (player , -2844, 1483.881521875, 49.9797288131714  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Ottos) then
            local player = getLocalPlayer()
                  setElementPosition (player , 1326.7004394531, -2840.574921875, 9.8597288131714  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Area51) then
            local player = getLocalPlayer()
                  setElementPosition (player , -824.61033300781, 2192.1982431641, 123.08539108276  ) 
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == BigEar) then
            local player = getLocalPlayer()
                  setElementPosition (player , 174.56447021484, 3035.1215283203, 29.465629577637  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == BlueBerry) then
            local player = getLocalPlayer()
                  setElementPosition (player , 2969.3661103248596, -1723.78341293335, 37.5212655067444  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Heli) then
            local player = getLocalPlayer()
                  setElementPosition (player , -2246.39447021484, 2099.9415283203, 5.965629577637  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Grove) then
            local player = getLocalPlayer()
                  setElementPosition (player , -311.3193359375, -3027.1716308594, 50.765625 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Dam) then
            local player = getLocalPlayer()
                  setElementPosition (player , -4235.02734375, 633.9217529297, 620.654315948486 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == BackBeyond) then
            local player = getLocalPlayer()
                  setElementPosition (player , 3409.93298339844, 1335.8010253906, 20.003288269043 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Quarry) then
            local player = getLocalPlayer()
                  setElementPosition (player , -3449.7600, -1642.94840595703, 61.8789616699 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Bayside) then
            local player = getLocalPlayer()
                  setElementPosition (player , 2082.322290625, -142.640660156, 28.9991247940063 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Pecker) then
            local player = getLocalPlayer()
                  setElementPosition (player , 140.91618725586, 637.1567421875, 420.863159790039 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Bridge) then
            local player = getLocalPlayer()
                  setElementPosition (player , 827.9711, -2061.2324, 13.86 )

            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Garage) then
            local player = getLocalPlayer()
                    setElementPosition (player , 2591.8709667969, -2347.7366357422, 13.652  )
            end
          end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Redring) then
            local player = getLocalPlayer()
                    setElementPosition (player , -566.404409667969, -649.5066357422, 326.252  )
            end
          end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-05, 20:08


Eitho







Wiek: 24
Na forum: 3630 dni
Posty: 330
Nick w MP: Eitho

Piwa: 749

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

"Waszkaa" napisał/a:

Witam !
Prosze o przerobienie skryptu w taki spos?b aby mozna by?o sie teleportowac razem z autem w kt?rym sie siedzi. P?ki co tylko mozna sie tepac gdy jest sie poza autem

Z g?ry dzi?ki i za pomoc daje R* :piwo:


function Window ( )

        if ( guiGetVisible ( myWindow ) == true ) then   
        
                guiSetVisible ( myWindow, false )

                showCursor ( false )
        else      
                guiSetVisible ( myWindow, true )

                showCursor ( true )
        end
end


myWindow = guiCreateWindow ( 0.16, 0.0, .7, .7, "JDM Legends", true )


local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow )
local Teleports = guiCreateTab( "Teleport na Mapy", tabPanel )




--GUI Buttons
LSAirport = guiCreateButton( 0.03, 0.01, 0.18, 0.12, "Touge Akina UP", true, Teleports )
guiSetFont ( LSAirport, "default-bold-small" )

LVAirport = guiCreateButton( 0.03, 0.13, 0.18, 0.12, "Touge Akina Down", true, Teleports )
guiSetFont ( LVAirport, "default-bold-small" )

AbandedAirstrip = guiCreateButton( 0.03, 0.25, 0.18, 0.12, "Touge Bihoku", true, Teleports )
guiSetFont ( AbandedAirstrip, "default-bold-small" )

SFAirport = guiCreateButton( 0.03, 0.37, 0.18, 0.12, "Drift Stage", true, Teleports )
guiSetFont ( SFAirport, "default-bold-small" )

MountChiliad = guiCreateButton( 0.03, 0.49, 0.18, 0.12, "East Minami Circuit", true, Teleports )
guiSetFont ( MountChiliad, "default-bold-small" )

WangCars = guiCreateButton( 0.03, 0.61, 0.18, 0.12, "Meihancircuit", true, Teleports )
guiSetFont ( WangCars, "default-bold-small" )

Ottos = guiCreateButton( 0.4, 0.01, 0.18, 0.12, "Drift Track", true, Teleports )
guiSetFont ( Ottos, "default-bold-small" )

Area51 = guiCreateButton( 0.4, 0.13, 0.18, 0.12, "Touge Ebisu Soutch", true, Teleports )
guiSetFont ( Area51, "default-bold-small" )

BigEar = guiCreateButton( 0.4, 0.25, 0.18, 0.12, "Touge Ebisu West", true, Teleports )
guiSetFont ( BigEar, "default-bold-small" )

BlueBerry = guiCreateButton( 0.4, 0.37, 0.18, 0.12, "Touge Project Touge", true, Teleports )
guiSetFont ( BlueBerry, "default-bold-small" )

Heli = guiCreateButton( 0.4, 0.49, 0.18, 0.12, "Touge Nikko", true, Teleports )
guiSetFont ( Heli, "default-bold-small" )

Grove = guiCreateButton( 0.4, 0.61, 0.18, 0.12, "Nakayubi", true, Teleports )
guiSetFont ( Grove, "default-bold-small" )

Dam = guiCreateButton( 0.77, 0.01, 0.18, 0.12, "Touge Okaru", true, Teleports )
guiSetFont ( Dam, "default-bold-small" )

BackBeyond = guiCreateButton( 0.77, 0.13, 0.18, 0.12, "Touge Gokart", true, Teleports )
guiSetFont ( BackBeyond, "default-bold-small" )

Quarry = guiCreateButton( 0.77, 0.25, 0.18, 0.12, "Ultra Nitro Track", true, Teleports )
guiSetFont ( Quarry, "default-bold-small" )

Bayside = guiCreateButton( 0.77, 0.37, 0.18, 0.12, "Touge Sekia.", true, Teleports )
guiSetFont ( Bayside, "default-bold-small" )

Pecker = guiCreateButton( 0.77, 0.49, 0.18, 0.12, "Tsukuba", true, Teleports )
guiSetFont ( Pecker, "default-bold-small" )

Bridge = guiCreateButton( 0.77, 0.61, 0.18, 0.12, "Fantazy Hill", true, Teleports )
guiSetFont ( Bridge, "default-bold-small" )


Redring = guiCreateButton( 0.4, 0.78, 0.18, 0.063, "", true, Teleports )
guiSetFont ( Close, "default-bold-small" )
Garage = guiCreateButton( -0.08, 0.87, 1.1, 0.063, "Garaz", true, Teleports )
guiSetFont ( Close, "default-bold-small" )
Close = guiCreateButton( -0.08, 0.94, 1.1, 0.063, "Zamknij", true, Teleports )
guiSetFont ( Close, "default-bold-small" )


bindKey ( "F2", "down", Window )


guiSetAlpha ( myWindow, 1 )
guiWindowSetSizable ( myWindow, false )

--Label Color
function changeLabelColor ( )

    guiLabelSetColor ( One, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end

setTimer ( changeLabelColor, 1000, 0 )


--Close
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
           if (source == Close) then
           guiSetVisible( myWindow, false )
           showCursor( false )
                end  

           end
)


--Teleports
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == MountChiliad) then
            local player = getLocalPlayer()
                    setElementPosition (player , -877.7409667969, 520.6766357422, 14.1091003418  )
            end
          end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == LSAirport) then
            local player = getLocalPlayer()
                        setElementPosition (player , -3289.7409667969, 890.6766357422, 322.1091003418  ) 
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == LVAirport) then
            local player = getLocalPlayer()
                  setElementPosition (player , -2926.9138183594, 487.1204833984, 5.2602405548  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == AbandedAirstrip) then
            local player = getLocalPlayer()
                  setElementPosition (player , -3266.59480957031, -1067.1661152344, 13.2322671096  ) 
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == SFAirport) then
            local player = getLocalPlayer()
                  setElementPosition (player , -3112.1933, -868.0136820678711, 10.471401863098  ) 
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == WangCars) then
            local player = getLocalPlayer()
                  setElementPosition (player , -2844, 1483.881521875, 49.9797288131714  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Ottos) then
            local player = getLocalPlayer()
                  setElementPosition (player , 1326.7004394531, -2840.574921875, 9.8597288131714  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Area51) then
            local player = getLocalPlayer()
                  setElementPosition (player , -824.61033300781, 2192.1982431641, 123.08539108276  ) 
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == BigEar) then
            local player = getLocalPlayer()
                  setElementPosition (player , 174.56447021484, 3035.1215283203, 29.465629577637  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == BlueBerry) then
            local player = getLocalPlayer()
                  setElementPosition (player , 2969.3661103248596, -1723.78341293335, 37.5212655067444  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Heli) then
            local player = getLocalPlayer()
                  setElementPosition (player , -2246.39447021484, 2099.9415283203, 5.965629577637  )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Grove) then
            local player = getLocalPlayer()
                  setElementPosition (player , -311.3193359375, -3027.1716308594, 50.765625 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Dam) then
            local player = getLocalPlayer()
                  setElementPosition (player , -4235.02734375, 633.9217529297, 620.654315948486 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == BackBeyond) then
            local player = getLocalPlayer()
                  setElementPosition (player , 3409.93298339844, 1335.8010253906, 20.003288269043 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Quarry) then
            local player = getLocalPlayer()
                  setElementPosition (player , -3449.7600, -1642.94840595703, 61.8789616699 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Bayside) then
            local player = getLocalPlayer()
                  setElementPosition (player , 2082.322290625, -142.640660156, 28.9991247940063 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Pecker) then
            local player = getLocalPlayer()
                  setElementPosition (player , 140.91618725586, 637.1567421875, 420.863159790039 )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Bridge) then
            local player = getLocalPlayer()
                  setElementPosition (player , 827.9711, -2061.2324, 13.86 )

            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Garage) then
            local player = getLocalPlayer()
                    setElementPosition (player , 2591.8709667969, -2347.7366357422, 13.652  )
            end
          end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == Redring) then
            local player = getLocalPlayer()
                    setElementPosition (player , -566.404409667969, -649.5066357422, 326.252  )
            end
          end
)


addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
    function ( )
        if (source == MountChiliad) then
            local player = getLocalPlayer()
            if isPedInVehicle(localPlayer) then
                player = getPedOccupiedVehicle(localPlayer)
            end
            setElementPosition (player , -877.7409667969, 520.6766357422, 14.1091003418  )
        end
    end)
Powinno dzia?a?, reszte trzeba tak samo przerobi? (je?li dzia?a), chocia? mo?na to by?o zapisa? wszystko kr?cej, np.
addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
    function ( )
        local player = getLocalPlayer()
        if isPedInVehicle(localPlayer) then
            player = getPedOccupiedVehicle(localPlayer)
        end
        
        if source == MountChiliad then
            setElementPosition (player , -877.7409667969, 520.6766357422, 14.1091003418  )
        elseif source == LSAirport then
            setElementPosition(player, -3289.7409667969, 890.6766357422, 322.1091003418)
        elseif source == LVAirport then
            setElementPosition (player , -2926.9138183594, 487.1204833984, 5.2602405548  )
        -- i tutaj mozesz tak dalej wypisywac elseif, byle by na samym koncu bylo end :)
        end
        
    end)


Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-05, 22:23


amited







Wiek: 26
Na forum: 3855 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

dawid2632, W gui click gracz to automatycznie localPlayer wi?c deklarowanie tej zmiennej nie ma sensu, i zmieni?bym "player" na "vehicle" wko?cu tam nie jest gracz tylko pojazd

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-05, 22:42


Eitho







Wiek: 24
Na forum: 3630 dni
Posty: 330
Nick w MP: Eitho

Piwa: 749

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

"amited" napisał/a:

dawid2632, W gui click gracz to automatycznie localPlayer wi?c deklarowanie tej zmiennej nie ma sensu, i zmieni?bym "player" na "vehicle" wko?cu tam nie jest gracz tylko pojazd

Ja edytowa?em tylko jego kod, a z racji ?e nie by?o potrzeby usuwania tego, to zostawi?em ;)

[ Dodano: 2017-12-05, 22:47 ]
Nie testowa?em tego, ale powinno dzia?a?. Kr?tsze i skoro nie wiadomo czy ma przenosi? pojazd czy gracza to lepiej da? element, niby nic nie zmieni ale mo?e kto? to inaczej b?dzie czyta?
addEventHandler ( "onClientGUIClick", resourceRoot,
    function ( )
        element = getPedOccupiedVehicle(localPlayer) or localPlayer
        
        if source == MountChiliad then
            setElementPosition(element, -877.7409667969, 520.6766357422, 14.1091003418)
...


Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-09, 19:39


Mikolajek451







Wiek: 27
Na forum: 3563 dni
Posty: 1
Nick w MP: SteveTurner



Respekt: 50

Witam. Od kilku miesi?cy, skrypt Counter Strike: RenderWare nie przeszed? nowszego update. Rozmawia?em z loopezloo [tw?rc? skryptu] udost?pni? on skrypt na GitHub.

Ludzie pomo?ecie, gdy np jest du?o graczy, zmieni si? teama to nagle co? zaczyna si? robi?, i nie da si? strzela?, lub np. wyst?puje bug, ?e runda si? nie zmienia. Skrypt mo?na kontrybutowa?, i mo?na go zmienia? i prosz? aby kto? naprawi? bugi z nim zwi?zane. Jak to naprawicie, bardzo wam dzi?kuje poniewa? sam autor nie ma tak duzo czasu, bo czasami jak sie do niego napisze, to odpisze ale za ilestam tyg, czy nawet miesi?cy. I drugi pow?d - chce u?y? go na moim serverze.

Je?eli u was bugi si? nie pojawiaj?, to pograjcie sobie kilka rund ze znaj. i potem niech jeden zmieni dru?yne i zobaczcie co wyskakuje w debugu bo tam si? nie znam za bardzo.

https://community.multitheftauto.com/?p=resources&s=details&id=10487
https://github.com/lopezloo/mta-csrw

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-16, 14:12


hades321akatrap







Wiek: 30
Na forum: 3468 dni
Posty: 5
Nick w MP: Cyprian



Respekt: 50

Szukam Skryptu na Nosze i desk? ort

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-18, 15:34


DaVeCS

Mapper






Wiek: 31
Na forum: 3527 dni
Posty: 193
Nick w MP: DaVe

Piwa: 59

Respekt: 70,5

Chcia?bym prosi? o przerobienie skryptu tak, aby przy rozwalonym silniku nie da?o si? go odpali?.

function displayVehicleLoss(loss)
    local thePlayer = getVehicleOccupant(source)
    local v = getPedOccupiedVehicle(thePlayer)
    if(thePlayer) then
        local health = getElementHealth ( v )
            if ( loss >= 50 and loss < 349 ) then
            local silnik = getVehicleEngineState(v)
                if silnik == true then
                setVehicleEngineState(v,false)
                outputchatBox(client, "*****?e? auto:D")
            end
        end
    end
end
addEventHandler("onVehicleDamage", getRootElement(), displayVehicleLoss)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-03, 13:26


patryk100141







Wiek: 29
Na forum: 5365 dni
Posty: 2
Nick w MP: stefan123



Respekt: 50

Witam mam skrypt na prace kierowcy ciezarowki (tira)
------------------Client------------------------
Kod:

--------------------------------------- Configuration ---------------------------------------
jobs = {
{name = "Los Santos Delivery",reward = 2330,truck = 403,trailer = 435,x = 2104.6611328125,y = -2086.919921875,z = 13.546875}
}
---------------------------------------------------------------------------------------------

local root = getRootElement()
local localPlayer = getLocalPlayer()
player = getLocalPlayer()
waypointBlip = waypointBlip

marker = createMarker(2806.314453125,903.01171875,10.757797241211-1.2,"cylinder",1,255,0,40,170)
truckingBlip = createBlip(2806.314453125,903.01171875,10.757797241211,51,1)
window = guiCreateWindow(435,218,528,462,"Trucking Job",false)
guiWindowSetSizable(window,false)
gridlist = guiCreateGridList(9,24,509,428,false,window)
column1 = guiGridListAddColumn(gridlist,"Job Name",0.6)
column2 = guiGridListAddColumn(gridlist,"Reward",0.3)

function startJob()
local selectedRow,selectedCol = guiGridListGetSelectedItem(gridlist)
local name = guiGridListGetItemText(gridlist,selectedRow,selectedCol)
for i,job in pairs(jobs) do
if job.name == name then
triggerServerEvent("createJobVeh",root,player,job.name,job.truck,job.trailer,job.x,job.y,job.z,job.reward)
end
end
end

addEventHandler("onClientResourceStart",root,function()
guiSetVisible(window,false)
addEventHandler("onClientGUIDoubleClick",gridlist,startJob,false)
end)

addEventHandler("onClientMarkerHit",marker,function(element,dimension)
if (getElementType(element) == "player") then
if (element == localPlayer) then
guiSetVisible(window,true)
showCursor(true)
outputChatBox("Press BackSpace to exit or double click on a job to start!",0,255,255)
player = element
for i,j in pairs(jobs) do
local row = guiGridListAddRow(gridlist)
guiGridListSetItemText(gridlist,row,column1,j.name,false,false)
guiGridListSetItemText(gridlist,row,column2,"$"..tostring(j.reward),false,false)
end
bindKey("backspace","down",killWindow)
end
end
end)

addEventHandler("onClientMarkerLeave",marker,function(element,dimension)
if (getElementType(element) == "player") then
if (element == localPlayer) then
guiSetVisible(window,false)
showCursor(false)
guiGridListClear(gridlist)
unbindKey("backspace","down",killWindow)
end
end
end)

addEvent("addBlip",true)
addEventHandler("addBlip",root,function(x,y,z)
waypointBlip = createBlip(x,y,z,41,1)
end)

addEvent("killBlip",true)
addEventHandler("killBlip",root,function()
destroyElement(waypointBlip)
end)

function killWindow()
guiSetVisible(window,false)
showCursor(false)
end


-------------------------------server-------------------
Kod:

local root = getRootElement()

addEvent("createJobVeh",true)
addEventHandler("createJobVeh",root,function(player,job,vehID,trailerID,x,y,z,reward)
local truck = createVehicle(vehID,2806.6708984375,912.271484375,10.75,0,0,90)
local trailer = createVehicle(trailerID,0,0,0,0,0,90)
triggerClientEvent(player,"addBlip",player,x,y,z)
local marker = createMarker(x,y,z-1.2,"cylinder",3,255,0,40,170)
outputChatBox("The job has started, go to the red marker on the minimap to finish the route!",player,0,255,255)
attachTrailerToVehicle(truck,trailer)
warpPedIntoVehicle(player,truck)
setVehicleLocked(truck,true)
setJob(player,tostring(job))
addEventHandler("onVehicleExit",root,function(player)
if source == truck then
cancelJob(player,blip,marker,truck,trailer)
end
end)
addEventHandler("onTrailerDetach",root,function()
if source == trailer then
cancelJob(player,blip,marker,truck,trailer)
end
end)
addEventHandler("onVehicleExplode",root,function()
if source == truck or source == trailer then
cancelJob(player,blip,marker,truck,trailer)
end
end)
addEventHandler("onMarkerHit",marker,function(element,dimension)
if element == truck or element == trailer then
finishJob(getVehicleOccupant(truck),reward,truck,trailer,blip,marker)
end
end)
end)

function setJob(player,job)
setElementData(player,"job",job)
end

function cancelJob(player,blip,marker,truck,trailer)
setElementData(player,"job",false)
triggerClientEvent(player,"killBlip",player)
destroyElement(marker)
destroyElement(truck)
destroyElement(trailer)
outputChatBox("Job failed!",player,255,0,0)
end

function finishJob(player,reward,truck,trailer,blip,marker)
setElementData(player,"job",false)
triggerClientEvent(player,"killBlip",player)
destroyElement(marker)
destroyElement(truck)
destroyElement(trailer)
outputChatBox("Job has been successfully completed!",player,0,255,0)
setPlayerMoney(player,getPlayerMoney(player)+reward)
end


Teraz wyjasniam o co mi chodzi:
o przerobienie funkcji cancelJob oraz finishJob.
Mianowicie funkcja cancelJob robi to ze po wyjsciu z ciezarowki usuwa ja i przyczepe itd. Chcialbym aby dziala ona na zasadzie jesli wyjde z pojazdu na chacie pisze cos w stylu wroc do pojazdu masz 20 sec i jezeli nie wejdzie w ciagu tych 20 sec to dzieje sie to co ma dziac a jesli wejdzie to zeby mogl dalej kontynuowa? prace.
I teraz funkcja finishJob dziala tak ze jak dojade do tego markera to robi to samo co poprzednia funkcja tylko daje nam pieniadze i pisze co innego na chacie.Tak czy innaczej jezeli dojade do celu to ciezarowka znika i musialbym isc na pieszo, poradzilem sobie z tym ze usunalem to ze ciezarowka znika i wracalem nia ale nie do konca to dziala. Chcialbym aby ta funkcja dzialala na zasadzie jade w wyznaczone miejsce wjezdzam w ten marker i wtedy na czacie jest napisane np zadanie wykonane wroc teraz do bazy i zeby na bazie pojawial sie marker(+blip) i zeby trzeba bylo do niego jechac dopiero po wjezdzie w ten marker zeby dzialo sie to co mialo sie dziac czyli daje nam kase usuwa ciezarowke itd
Mam nadzieje ze mi pomozecie :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-04, 16:06


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4291 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4661

Respekt: 1436,8
Respekt: 1436,8

1.

function cancelJob(player,blip,marker,truck,trailer) 
outputChatBox("Masz 20 sekund by wr?ci? do pojazdu.",255,255,255)
    cancel = setTimer(function(player,marker,truck,trailer)
setElementData(player,"job",false) 
triggerClientEvent(player,"killBlip",player) 
destroyElement(marker) 
destroyElement(truck) 
destroyElement(trailer) 
outputChatBox("Job failed!",player,255,0,0) 
     end,20*1000,1,player,marker,truck,trailer)
end 

addEventHandler("onClientVehicleEnter",resourceRoot,function(plr,seat)
    if seat == 0 and plr == getLocalPlayer() then
        if isTimer(cancel) then
            killTimer(cancel)
        end
    end
end)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
patryk100141
Wysłany: 2018-01-05, 16:07


patryk100141







Wiek: 29
Na forum: 5365 dni
Posty: 2
Nick w MP: stefan123



Respekt: 50

Teraz w ogole mi nie zaczyna tej pracy :(

[ Dodano: 2018-01-05, 16:47 ]


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-08, 15:20


DaVeCS

Mapper






Wiek: 31
Na forum: 3527 dni
Posty: 193
Nick w MP: DaVe

Piwa: 59

Respekt: 70,5

M?g?by? kto? powiedzie? jak to przerobi? pod rpg w sensie z u?yciem funcji: if getAdmin(plr,4) or getAdmin(plr,3) then


Oto ten skrypt:

addCommandHandler ( "walizka", function(plr,cmd,kwota,...)
if kwota and ... then
local accName = getAccountName ( getPlayerAccount ( plr ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
x,y,z = getElementPosition ( plr )
msg = table.concat ( {...}, " " )
walizka = createPickup ( x, y+3, z, 3, 1210, 0, 0 )
setElementData ( walizka, "kasa", tonumber(kwota) )
outputChatBox ( "&#8226;&#8226;&#8226; Administrator zgubi? walizk? &#8226;&#8226;&#8226;", root, 250, 10, 0  )
outputChatBox ( "&#8226;&#8226;&#8226; Podpowied? : "..msg.." &#8226;&#8226;&#8226;", root, 250, 10, 0 )
end
end
addEventHandler ( "onPickupHit", walizka, function(plr)
x = getElementData ( walizka, "kasa" )
outputChatBox ( "&#8226; "..getPlayerName(plr).." znalaz? walizk?, a w niej "..string.format("%0.2f",x/100*100).." PLN &#8226;", root, 250, 10, 0 )
destroyElement ( walizka )
givePlayerMoney ( plr, tonumber(x)*1)
end)
end)


Postaw piwo autorowi tego posta
 

 
Tagi: prośby :: przerobienie :: skryptu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Zasoby do MTA » PROŚBY O PRZEROBIENIE SKRYPTU Odpowiedz do tematu

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